-
Notifications
You must be signed in to change notification settings - Fork 219
Add an experimental opt-in libfyaml backend #805
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
Merged
+1,353
−6
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1f20592
Add experimental opt-in libfyaml backend
hsbt 4c57ca5
Resolve booleans per YAML 1.2 on the libfyaml backend
hsbt 0486109
Improve libfyaml parser fidelity and error reporting
hsbt 86ff1f4
Match libyaml scalar emission on the libfyaml backend
hsbt e0bcad8
Transcode UTF-16 IO input to UTF-8 on the libfyaml backend
hsbt 53122b9
Free tag-directive buffers on the error path in start_document
hsbt b6d1141
Make the test suite backend-aware for the libfyaml backend
hsbt e98b715
Harden the libfyaml backend after code review
hsbt 3c40dca
Add positive tests for the libfyaml backend
hsbt 65fce57
Add CI for the experimental libfyaml backend
hsbt 0214581
Document the experimental libfyaml backend in the README
hsbt e56d9f7
Fix the libfyaml CI verify step quoting
hsbt 05ee44c
Address Copilot review feedback on the libfyaml backend
hsbt 6a10194
Require libfyaml 0.9 and build it from source in CI
hsbt 9eb4a33
Document libfyaml scalar style and SyntaxError differences
hsbt d185ff2
Note libfyaml performance and when to prefer libyaml
hsbt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: libfyaml | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| schedule: | ||
| - cron: '33 11 * * 0' | ||
| workflow_dispatch: | ||
|
|
||
| # Exercises the experimental, opt-in libfyaml backend (--enable-libfyaml). | ||
| # libfyaml is not supported on Windows, so this workflow runs on Linux and | ||
| # macOS only. The default libyaml backend is covered by test.yml/libyaml.yml. | ||
| jobs: | ||
| ruby-versions: | ||
| uses: ruby/actions/.github/workflows/ruby_versions.yml@master | ||
| with: | ||
| engine: cruby | ||
| min_version: 3.0 | ||
|
|
||
| build: | ||
| needs: ruby-versions | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} | ||
| os: [ ubuntu-latest, macos-latest ] | ||
|
|
||
| env: | ||
| LIBFYAML_VERSION: "0.9.6" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7.0.0 | ||
| - name: Set up Ruby and libfyaml | ||
| uses: ruby/setup-ruby-pkgs@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby }} | ||
| apt-get: "pkg-config" | ||
| brew: "libfyaml pkg-config" | ||
| - name: Build libfyaml from source | ||
| # The libfyaml-dev package on Ubuntu is 0.8, which crashes the emitter, | ||
| # so build a known-good release. macOS uses the Homebrew build above. | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| curl -fsSL "https://github.com/pantoniou/libfyaml/releases/download/v${LIBFYAML_VERSION}/libfyaml-${LIBFYAML_VERSION}.tar.gz" | tar xz | ||
| cd "libfyaml-${LIBFYAML_VERSION}" | ||
| ./configure --prefix=/usr/local | ||
| make -j"$(nproc)" | ||
| sudo make install | ||
| sudo ldconfig | ||
| - name: Install dependencies | ||
| run: bundle install --jobs 3 | ||
| - name: Compile with the libfyaml backend | ||
| run: rake compile -- --enable-libfyaml | ||
| - name: Verify the libfyaml backend is active | ||
| run: | | ||
| ruby -Ilib -rpsych -e 'abort "expected the libfyaml backend, got #{Psych::BACKEND}" unless Psych::BACKEND == "libfyaml"' | ||
| ruby -Ilib -rpsych -e 'puts "libfyaml #{Psych.libfyaml_version}"' | ||
| - name: Run test | ||
| run: rake test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.