Remove demanding dependency fast_yaml #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There were some complaints that :fast_yaml couldn't compile for some users. I've investigated the issue, but couldn't find an alternative as there's no native YAML encoder in Elixir/Erlang. Now that we have native JSON implementation, who knows...
Anyway, I didn't spend much time on that until I got the same issue. Of course, this time I've had to find a solution. So, after again wasting a couple of hours trying to set up :fast_yaml dependency and searching for an alternative, I finally decided to write my own YAML encoder. I didn't need to support everything YAML has to offer. I guess that laziness was also one of the reasons behind GitHub's insufficient support of the YAML standard which forced me to create this generator in the first place 😁
I'm not proud of this code, but at least it works™. And it's closer to GitHub's examples than the version that uses :fast_yaml.
Also, this fixes #2.
Now it's possible to have
pull_request:
instead ofpull_request: []
.Look at:
github_workflows_generator/.github/workflows/ci.yml
Lines 3 to 7 in b48263b
Linter didn't complain about the newly generated ci.yml file and Prettier didn't find anything to change.