Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

praseodym
Copy link
Contributor

Replace the unmaintained yaml-rust dependency with yaml-rust2, as recommended by RUSTSEC-2024-0320.

Even though the dependency is renamed in Cargo.toml, the public API still changes as can be seen in the updated tests/snapshots/public-api.txt.

Supersedes #544 (has merge conflicts) and #555 (fails CI).

@praseodym
Copy link
Contributor Author

The bat syntax regression test fails:

[bat error]: /home/runner/work/syntect/syntect/bat/assets/syntaxes/02_Extra/Jsonnet/jsonnet.sublime-syntax: Invalid YAML file syntax: while parsing a quoted scalar, found unknown escape character at byte 2838 line 93 column 14

It looks like the jsonnet.sublime-syntax file has actual invalid syntax (\') on line 93 and 117. Online tools like https://www.yamllint.com/ and https://yamlchecker.com/ also report the same error.

This PR introduces a regression for bat, but only because bat's regression test includes a file with seemingly invalid syntax. How do we resolve this?

Copy link
Collaborator

@keith-hall keith-hall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it, I can fix bat separately :) thanks!

@keith-hall keith-hall merged commit a85dde9 into trishume:master Sep 17, 2025
4 of 5 checks passed
@CosmicHorrorDev
Copy link
Contributor

Oop, I think merging this was a breaking change. I was hoping to get out a 5.3.0 release 😅

@keith-hall
Copy link
Collaborator

My bad, I probably rushed a bit because I felt that we should probably have upgraded this dependency a while ago... Would it make sense to push a commit reverting this PR, make the minor release, then revert the revert? 😅

@CosmicHorrorDev
Copy link
Contributor

I think that should work out totally fine 👍

@keith-hall
Copy link
Collaborator

Just to be clear, I don't have cargo publish permissions for syntect so it will need one of the other maintainers to perform the release

@Enselic
Copy link
Collaborator

Enselic commented Sep 22, 2025

@keith-hall I can add you as owner for https://crates.io/crates/syntect so you can make releases on your own. If you'd like?

CC other owners @trishume @robinst

@praseodym praseodym deleted the yaml-rust2 branch September 22, 2025 09:23
@keith-hall
Copy link
Collaborator

Sure, that could be convenient, thanks 👍 do we have any documentation on the release process/checklist for syntect? I had a quick look but didn't see anything

@Enselic
Copy link
Collaborator

Enselic commented Sep 25, 2025

I invited you as owner now.

I don't think there is a checklist, but I think doing this is sufficient:

  • Ensure CI passes for the commit you want to publish
  • checkout that commmit locally
  • cargo publish
  • git tag and push the tag

My recommendation is to not have any long-term auth token around. Best would be if we enabled trusted publishing. Here is a minimal example from one of my projects: https://github.com/Enselic/snapshot-testing/blob/main/.github/workflows/release.yml. But that is a nice-to-have and not blocking any releases.

@keith-hall
Copy link
Collaborator

Thanks, release has been made. I noticed we have a Release workflow in syntect, but when I tried it, it didn't work:

The workflow is not valid. .github/workflows/Release.yml (Line: 25, Col: 40): Invalid input, one_time_crates_io_token_secret is not defined in the referenced workflow.

So I published manually for now. And raised a new PR to re-apply yaml-rust2: #602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants