Skip to content

Java regex nested assertions - #1661

Merged
arcuri82 merged 13 commits into
java-regex-simple-assertionsfrom
java-regex-nested-assertions
Aug 10, 2026
Merged

Java regex nested assertions#1661
arcuri82 merged 13 commits into
java-regex-simple-assertionsfrom
java-regex-nested-assertions

Conversation

@lmasroca

@lmasroca lmasroca commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Allowed assertions (currently only lookaheads #1646 and lookbehinds #1656) to appear nested (within a group ()) on java regex. Allowed assertion requirements and repairs to escape their groups into neighboring terms. The outwards requirements of a group must be resolved by that group's neighboring genes during repairs for the repairs to be successful.

Note: Does not allow assertions to appear on quantified groups.

@lmasroca
lmasroca requested a review from jgaleotti August 4, 2026 16:44
@jgaleotti
jgaleotti requested a review from arcuri82 August 6, 2026 17:56
@lmasroca
lmasroca requested a review from arcuri82 August 10, 2026 01:13
@arcuri82
arcuri82 merged commit a69e15a into java-regex-simple-assertions Aug 10, 2026
@arcuri82
arcuri82 deleted the java-regex-nested-assertions branch August 10, 2026 07:04
@arcuri82

Copy link
Copy Markdown
Collaborator

hi @lmasroca @jgaleotti

regarding

commits into java-regex-simple-assertions from java-regex-nested-assertions

you should make PRs toward master, not other branches. otherwise, I guess when I get to review java-regex-simple-assertions i will have to re-see all the code here again?

@lmasroca

Copy link
Copy Markdown
Collaborator Author

Hi @arcuri82, the plan was to first merge java-regex-simple-assertions into master and then github would change the base automatically to master for the following PRs. This way we can have smaller PRs with smaller diffs. Should we do something about the current open PR?

@arcuri82

Copy link
Copy Markdown
Collaborator

hi @lmasroca . sorry, I am not sure I am following... how does that make "smaller" PRs? maybe i m missing something here.... isn't java-regex-simple-assertions now bigger because it contains all changes from this merged PR?

@lmasroca

lmasroca commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Yes it is bigger now, but that is because the other branches were merged into java-regex-simple-assertions first instead of the other way around. If java-regex-simple-assertions was merged first into master then the next PR (which was #1656) would get re-targeted to master automatically, and both before and after the diff would just show that branches' own changes. This allows us to work further on changes not yet merged while keeping the diffs for each PR to just the changes that PR made. We probably should have made this clearer and marked the branch dependencies clearly.
To solve the current issue we could try maybe reverting the PR merges on java-regex-simple-assertions and restoring each branch, then doing the merges against master in order (#1646 then #1656 and then #1661).

@arcuri82

Copy link
Copy Markdown
Collaborator

right now do not revert, as i think it would make things worse. let's just stabilize java-regex-simple-assertions, and merge that into master before it gets even bigger, even if not fully completed. then, in future, new branches should be merged into master, and not in secondary branches.
even if some functionalities are not fully completed, they can still be merged into master, as long as they don't break CI

@lmasroca

lmasroca commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Okay, java-regex-simple-assertions should be stable now, and the requested change got implemented already. Will keep this in mind to avoid this issue again in the future, sorry for the confusion!

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.

3 participants