-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yaml instead of json #148
yaml instead of json #148
Conversation
Interesting, thanks! I'll play around with it tonight and gather some thoughts around this. I'm positive about it, but I won't commit to merging it yet. If you have time, could you:
|
native-image failing only on Windows 😞
This is the difference in logs I guess the only things we can do is report it to GraalVM... the only issues I was able to google are these, but they don't seem relevant at first glance: |
Reported bug for GraalVM native-image oracle/graal#4659 |
@oyvindberg Let's suppose that the Windows native-image issue is sorted for a moment now. |
Absolutely, if we do yaml we drop json. There are no legacy users to consider, and I only want flexibility in this tool where it is absolutely needed. |
Cool, fair enough 👍 |
I pushed a commit now with further changes, you can also see yaml versions of the build file for bleep itself, and for the four projects which are used for testing. the test suite does a full import of an sbt build for each project and generates a corresponding bleep.yaml file so we can track changes in behavour over time |
the build files do look a whole lot better, I'll give it that |
|
I'm sorry @hamnis, it's going to be json or yaml. Someone else will have to fight the good fight of making the world choose a slightly less terrible way of expressing data. Prioritized list of things I care about:
slight win for json on 1) and 2), while yaml wins 3) by a very large margin. Have a look at this build file for instance. I think it looks rather nice! I strongly dislike yaml as well for all the reasons you gave, but it's better to read and write than json. and no other data language is close in terms of tooling support OOTB and familiarity. |
that said, this snakeyaml library needs to be replaced somehow. are there any other options out there? |
scalacOptions do not look their best though, it's rather unfortunate with the dashes. templates:
template-common:
platform:
name: jvm
scala:
options:
- -encoding
- utf8
- -feature
- -language:experimental.macros
- -language:higherKinds
- -language:implicitConversions
- -unchecked |
maybe as a multi-line string instead, I've heard those are awesome in yaml :D |
turns out there is a successor library called snakeyaml-engine, which only does yaml 2.4 (which seems like it avoids some of the common problems with yaml). it seems to be of much higher quality, so I don't suppose it will cause the same issue. crucially, it has no support for the old, bastardized java beans pattern at all. I forked circe-yaml, updated it to that new library. necessary changes https://github.com/circe/circe-yaml/compare/master...bleep-build:snakeyaml-engine?expand=1 . There are tests for some old yaml-crap which need to be updated before it can be upstreamed. |
|
haha cool, I read that as 2.4 and kept writing that everywhere |
options:
- -encoding
- utf8
- -feature
- -language:experimental.macros
- -language:higherKinds
- -language:implicitConversions
- -unchecked can be just options: ['-encoding', 'utf8', '-feature', '-language:experimental.macros', '-language:higherKinds', '-language:implicitConversions', '-unchecked'] |
concerns the following files: $PROJECT/bleep.yaml (build file) $PROJECT/.bleep/bsp/project-selection.yaml (used to only mount some subset of projects in IDE) $HOME/.config/bleep/config.yaml (user-level config)
ok, we'll iterate on this going forward, but I'm feeling good enough about it now. In it goes, thanks @sideeffffect |
Nice 🚀 thank you too |
Continuing the conversation from #7 (comment)
There are other interesting candidates for format for configuration besides JSON: JSON5, TOML, HOCON, ... However, YAML is the best choice, because: