Comments (5)
Fixed now, thanks
from simple-yaml.
I can't reproduce it.
I tried:
final YamlFile yamlFile = new YamlFile("examples/issue-56.yml");
yamlFile.createOrLoadWithComments();
final String syncComment = "This is a configuration file synchronization feature, you can configure RikkaAC on one server, and\n" +
"then use \"/rikka sync\" to synchronize to all RikkaAC connected to the same database, this is very\n" +
"convenient for some large networks";
final String syncConfigComment = "Whether the sync feature should sync config.yml\n" +
"(!) Note that this will override the storage setting\n" +
"(!) Better to not change storage setting if you want to sync";
Normal API:
yamlFile.set("sync.sync-config", true);
yamlFile.setComment("sync", syncComment);
yamlFile.setComment("sync.sync-config", syncConfigComment, YamlCommentFormat.BLANK_LINE);
Alternative API:
yamlFile.path("sync")
.comment(syncComment)
.path("sync-config")
.set(true)
.comment(syncConfigComment, YamlCommentFormat.BLANK_LINE);
Also:
yamlFile.path("sync")
.comment(syncComment)
.path("sync-config")
.set(true)
.comment(syncConfigComment).blankLine();
And:
yamlFile.set("sync.sync-config", true);
yamlFile.path("sync").comment(syncComment);
yamlFile.path("sync.sync-config").comment(syncConfigComment, YamlCommentFormat.BLANK_LINE);
All of these with the same output on yamlFile.save()
:
# This is a configuration file synchronization feature, you can configure RikkaAC on one server, and
# then use "/rikka sync" to synchronize to all RikkaAC connected to the same database, this is very
# convenient for some large networks
sync:
# Whether the sync feature should sync config.yml
# (!) Note that this will override the storage setting
# (!) Better to not change storage setting if you want to sync
sync-config: true
I think the build on jitpack was on a wrong commit, I've done a rebuild, if you are using maven please download the dependency again. Maybe you need to clear the cache in your user directory at .m2/repository/me/carleslc
first.
from simple-yaml.
Hi, I tried again with clean dependency cache, but it still happens
from simple-yaml.
But this code working:
yaml.path("c.c")
.set("fuck you")
.comment("fuck you")
.blankLine()
Maybe something is wrong with YamlCommentFormat
from simple-yaml.
Ok, I've been able to reproduce the issue creating a fresh new maven project, because using the repo directly was working fine. Again, was an issue with jitpack serving the wrong build, because the problem was already solved, but on a newer commit than the one jitpack was serving with 1.8 release.
The rebuild done in my previous message was pointing to com.github.Carleslc.Simple-YAML
groupId but jitpack still cached the me.carleslc.Simple-YAML
to the previous build. Now it serves the correct build.
Clear the cache again at .m2/repository/me/carleslc
and reload your maven project, it should be working fine now (worked for me in the fresh project).
<dependency>
<groupId>me.carleslc.Simple-YAML</groupId>
<artifactId>Simple-Yaml</artifactId>
<version>1.8</version>
</dependency>
from simple-yaml.
Related Issues (20)
- Load YamlConfiguration Error HOT 1
- Key setting with single quote despite no special characters. HOT 10
- Header being duplicated when there is no comment on the root key HOT 3
- There is a bug when i set the list HOT 2
- NoSuchMethodError when registering config HOT 6
- Invalid configuration caused by the library itself? HOT 3
- addDefault doesn't work since 1.8 if file contains only defaults HOT 5
- Enhancement/Feature Request - addDefault() enforce quote style HOT 3
- Bump up of SnakeYML to 1.31. HOT 1
- (Velocity dependency clash) java.lang.NoSuchMethodError HOT 13
- java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.DumperOptions.setIndentWithIndicator(boolean)' HOT 3
- Could not find artifact me.carleslc.Simple-YAML:Simple-Configuration:jar:1.8.3 in central (https://repo1.maven.org/maven2) HOT 6
- [Question] String length limit! Can it be disabled? HOT 3
- Update snakeyaml version to 2.0 HOT 1
- The method for saving the config is not working. HOT 2
- ConfigurationSection#addDefault changes values if present HOT 2
- Custom Domain Jitpack Deployment HOT 5
- String List placement inside yaml HOT 10
- YamlFile#load & #loadWithComments behave different on double quote value HOT 6
- Memory Leak Problem HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-yaml.