alixinne / glsl-lang

LALR parser for GLSL
https://alixinne.github.io/glsl-lang/glsl_lang/
BSD 3-Clause "New" or "Revised" License
23 stars 4 forks source link

Replace dependency on `lazy_static` by `once_cell` #16

Closed AlexTMjugador closed 1 year ago

AlexTMjugador commented 1 year ago

once_cell is a more ergonomic alternative to lazy_static which provides a more straightforward syntax for lazily initialized statics. Its API is also closer to the nightly std::sync::LazyLock, which should make it easier to migrate to it in the event that it gets stabilized. once_cell is also pulled in transitively more often than lazy_static by the dependencies of this project, and I think it's likely that the ecosystem will move to once_cell.

alixinne commented 1 year ago

Thanks for the contribution! I wasn't aware of once_cell being a thing, its API surely is nicer than lazy_static's so I agree the change is worthwhile.

You'll just need to reword your commit so it follows Conventional Commits to which I migrated this project to in order to automate releases. In this case it should be "chore(deps): replace dependency on lazy_static by once_cell".

Since your other PR (#15) would be something like fix(lexer): fix injecting ... it'll trigger a release packing both these changes together when I merge it afterwards.

AlexTMjugador commented 1 year ago

Thanks for the prompt response! I focused my attention on older commits and didn't notice that the project migrated to Conventional Commits. I'll take care of rewording commits and fixing my other PR soon.