Rewrite the lexer and parser in human_encoding#354
Rewrite the lexer and parser in human_encoding#354apoelstra merged 1 commit intoBlockstreamResearch:masterfrom
Conversation
|
We used CI to scan one of our projects for license compliance, and found that a dependency of rust-simplicity has an incompatible license with the CC0 license used by rust-simplicity: |
|
@apoelstra, In src/human_parsing/README.md, I saw that we already planned to move away from this toolkit, so it shouldn't be a major issue? License compliance might currently block few of our releases |
|
@ivanlele this is not a derivative work and we are not shipping any part of our dependencies without their license. We are allowed to use GPL 3 dependencies in a CC0 project. Is there any other motivation for this 1500-line diff that adds new dependencies and which touches code that, as you say, we don't intend to use or expand? |
|
@apoelstra I’m not arguing that we are allowed to use GPL3 dependencies in our CC0 project. The concern is more about potential inconvenience for a user who wants to keep their code private and unknowingly uses the human_encoding module, in which case the GPL3 license would apply as it would be included in their distributing binary. human_encoding is part of the default public API, which can fasilitate such cases. Perhaps it would make sense to put the human_encoding module behind a feature flag and add a warning to prevent accidental usage, or change it inner work, as this PR does.
I didn’t say that. human_encoding is useful for tests and potentially for prototyping combinators. What I was referring to in the README is the intention to eventually switch the underlying toolkit, and not intent to to discard or archive it. |
Which was motivation for creating this PR |
I wouldn't mind feature-gating it. We should not put a 'GPL3" warning on it though. People who want to be antisocial can pay their own lawyers to do the technical work. I also wouldn't mind going in another direction and just relicensing this whole project as GPLv3. |
|
concept ack 10b9730. I read through the code and other than the lockfile noise I'm happy with this:
I would also like to feature-gate this whole module since it's kinda niche and involves a whole extra dependency. We can do that in a followup if you want. |
10b9730 to
56a2e06
Compare
Sure, I'll roll this into the next PR. human_encoding should be an appropriate name for this feature, I think |
a86927e Add human_encoding feature (ivanlele) Pull request description: This PR introduces a new feature flag, `human_encoding`, which locks the module of the same name. It is a followup to the discussion in #354. ACKs for top commit: apoelstra: ACK a86927e; successfully ran local tests; thanks for the quick iteration! Tree-SHA512: b29dde060422c71269871952ea88adb080e2d723a4b727f4bbafe723c8dc9c5f824c6b442895f7114d63f1868a287799b90db0e159ca7c2f16eb034a51ba7ca9
This PR replaces the toolkit used in the human_encoding module with a logos lexer and a custom parser.