Skip to content
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

Release 0.20.1 #842

Merged
merged 5 commits into from
Oct 23, 2023
Merged

Release 0.20.1 #842

merged 5 commits into from
Oct 23, 2023

Conversation

Pat-Lafon
Copy link
Contributor

This is an attempt to "kick-the-tires" on a new release based on https://github.com/orgs/lalrpop/discussions/823.

I did an initial draft of the release notes in RELEASES.md and ran ./version.sh to update the version number in all the places.

Copy link
Contributor

@dburgener dburgener left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together! I think it looks mostly good from my perspective. Just a couple of minor notes on the changelog.

RELEASES.md Outdated Show resolved Hide resolved
RELEASES.md Outdated Show resolved Hide resolved
@dburgener
Copy link
Contributor

The notes look good, however I gave it one final test, and I'm seeing problems. If I build using the commit before #814, everything works, but #814 without unicode support is translating my regexes containing ^ into an enumeration of all the possible unicode characters except excluded ones, and then panicing at run time upon encountering the unicode. I'm looking into a root cause and fix, but I'm not sure if I'll be able to get to it tonight.

@dburgener
Copy link
Contributor

I'm out of time for tonight unfortunately. I'm getting weird failures both with and without unicode when trying to run tests in https://github.com/dburgener/cascade against lalrpop e2eb361, but not against e2eb361^.

When I run without unicode, I get the unexpected unicode on ^ patterns I mentioned above. When I run with unicode, a few of my error tests for non-parsing input don't terminate in a reasonable amount of time.

I'm trying to get a simple reproducer that's more pure-lalrpop to narrow down what's wrong, but I haven't been successful at that yet. It's not clear to me at this point why my code is failing but the lalrpop tests aren't. Perhaps its user error on my end. I'll take a look in the morning and follow up then.

Copy link
Contributor

@yannham yannham left a comment

Choose a reason for hiding this comment

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

LGTM, beside side suggestions. I don't approve in order to wait for @dburgener to sort his tests out before potentially merging this.

@@ -1,12 +1,12 @@
[package]
name = "calculator"
version = "0.20.0"
version = "0.20.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we use something like:

version.workspace = true

if this crate always follows the version of the main package of the workspace? This would save future version bumps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a fair point. It doesn't seem like any of these examples get rendered in the lalrpop book so it seems fine.

Actually on that point, maybe we should be pointing to these examples in the book instead of the tests when possible(referring to http://lalrpop.github.io/lalrpop/tutorial/index.html). Otherwise, I'm not sure how much visibility some of these get.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've spawned this off to it's own pr to be discussed/merged separately.


[dependencies]
lalrpop-util = { version = "0.20.0", path = "../../lalrpop-util", features = ["lexer", "unicode"] }
lalrpop-util = { version = "0.20.1", path = "../../lalrpop-util", features = ["lexer", "unicode"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly, can we do something like:

lalrpop-util = { workspace = true, features = [ "lexer", "unicode" ] }

here, and put in the main Cargo.toml something like:

lalrpop-util = { version = "0.20.1", path = "./lalrpop-util"}

Sorry, it might be out of scope of this PR, but I've been doing that in other projects (define workspace-level dependencies for workspace members, and a workspace-level version, and use that everywhere else so that you only have to bump each member's, and only if it doesn't inherit the workspace's main version) and I wonder if it could make the workflow simpler for LALRPOP. Feel free to tell me that we can see that later 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #843

@@ -3,6 +3,8 @@
# A script to bump the version number on all Cargo.toml files etc in
# an atomic fashion.

set -e -o pipefail
Copy link
Contributor

@yannham yannham Oct 17, 2023

Choose a reason for hiding this comment

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

Ah, I only see this script now. So maybe it's not really a hassle if it's automatized, although the script feels a bit ad-hoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is somewhat automated, in a kinda hacky way. I think we could do a little bit better here in terms of setting up the release process steps. Not sure what big crates do in this regard. Maybe something that includes a mini-crater run or cargo-semvar-checks to help catch any last minute issues.

@dburgener
Copy link
Contributor

I think I have a solution for the issues I'm seeing. I haven't tested it end to end yet, but limited testing I've done looks promising.

I believe the problem is that even before #814, when we use regex-syntax to parse our regexes, we didn't correctly disable unicode on non-unicode builds, which resulted in unicode regexes ending up in the generated parser. Prior to #814 this seems to have not mattered, I think because internals of regex compile the unicode away anyways (based on this reply to a similar, but different issue. The issue there was a bug in regex-syntax, but this is a bug in our code, that happens to hit a similar symptom).

Anyways, I'm going to tidy up my fix and do end to end testing. If all goes well, I'll have a PR up in a bit.

@dburgener
Copy link
Contributor

Oh, the other thing is that I'm still kind of mystified as to why our existing lalrpop tests didn't catch this at all. I'm going to prioritize getting the fix in to unblock the release, but then I'll try to loop back and identify the testing gap.

@dburgener
Copy link
Contributor

Okay, the second issue was user error in the sense of "why on earth would you do that, don't do that", and lalrpop error in the sense of "we should handle this bad input more sanely".

I had a skip pattern that could match zero length regexes. #814 seems to have inadvertently dropped a check that returned "InvalidToken" if our longest match was a zero length skip pattern.

Note that the lalrpop book does recommend possibly zero length whitespace matches: https://lalrpop.github.io/lalrpop/lexer_tutorial/001_lexer_gen.html#customizing-skipping-between-tokens

I think the fix should be to restore the original check to return InvalidToken on a zero length skip match. I'll submit a PR for that as well.

@Pat-Lafon
Copy link
Contributor Author

All this sounds good to me! Thanks for the detailed look.

@dburgener
Copy link
Contributor

#845 is up

Everything seems good as far as I can tell. Once we get those merged, I'll retest.

@youknowone
Copy link
Contributor

I'd like to add credits for new maintainers, who contributed a lot not only for this version but for longer time.

@youknowone
Copy link
Contributor

is #844 the last piece of new release?

@dburgener
Copy link
Contributor

is #844 the last piece of new release?

That plus this PR of course is all I'm tracking on. It looks like everyone is okay with #844, so I'll go ahead and merge that later today.

@dburgener
Copy link
Contributor

#844 is merged.

I ran the same tests I did previous that uncovered the bugs against the latest master, and they passed this time. This seems ready to go from a functional perspective in my opinion.

Copy link
Contributor

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Released 0.20.1 👍

@youknowone youknowone added this pull request to the merge queue Oct 23, 2023
Merged via the queue into lalrpop:master with commit 0c3599b Oct 23, 2023
@youknowone
Copy link
Contributor

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