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

feat: Make comment RegExps non-greedy to prevent some max call stack errors #65

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

Delagen
Copy link
Collaborator

@Delagen Delagen commented Jun 13, 2019

No description provided.

@thlorenz
Copy link
Owner

This looks interesting and I'm fine with this in general as long as it doesn't break any other functionality.
It's been a while since you filed this (I'm sorry for the super long delay).
Is this still a problem for you or did the newer v8 version fix it?

@chpio
Copy link

chpio commented Jan 25, 2022

Is this still a problem for you or did the newer v8 version fix it?

just got the

RangeError: Maximum call stack size exceeded
    at String.match (<anonymous>)
    at Object.exports.fromSource (.../node_modules/combine-source-map/node_modules/convert-source-map/index.js:122:19)
    at resolveMap (.../node_modules/combine-source-map/index.js:52:21)
    at Combiner.addFile (.../node_modules/combine-source-map/index.js:112:21)

exception. [email protected], [email protected] (1.8.0 is the current version)

wow the last release of combine-source-map is 5 years ago, and still rocking ancient deps.

.travis.yml Outdated Show resolved Hide resolved
@thlorenz
Copy link
Owner

Thanks @phated for cleaning this up. If no tests are failing we could merge.
Just have to be very careful whenever we change the regex as it could fail in unexpected ways.

Therefore if we do merge we need to publish as new major (I'll take care of that).

@phated
Copy link
Collaborator

phated commented Oct 10, 2022

Therefore if we do merge we need to publish as new major (I'll take care of that).

I agree! I was hoping to land #74 as a minor and then a few of the other open PRs as a major. Does that work for you @thlorenz ?

@thlorenz
Copy link
Owner

Yes that would work .. also now we got CI going again.

However the Node.js versions tested are super old now, we should probably test 0.14, 0.16, 0.18 instead.
So I'd like to get that in first, then merge #74, publish a minor and then worry about the regex PRs

@phated
Copy link
Collaborator

phated commented Oct 10, 2022

However the Node.js versions tested are super old now, we should probably test 0.14, 0.16, 0.18 instead.

We're actually testing pretty much every major version of node now: "0.10", "0.12", "4", "6", "8", "10", "12", "14", "16", "18"

@thlorenz
Copy link
Owner

Ah ok didn't see CI running those versions.
So not sure at this point cause this PR is at odds with #75.

It seems like they should be combined into one (possibly making the regex recommended in #75 non-greedy)?

Maybe @Delagen has an idea as well?

@phated
Copy link
Collaborator

phated commented Oct 10, 2022

Yeah, I am planning to merge this into master and then update #75 to take it into account.

@phated phated changed the title Make comment regex ungreedy to prevent Max call stack error in some cases feat: Make comment regex ungreedy to prevent some max call stack errors Oct 10, 2022
@phated phated changed the title feat: Make comment regex ungreedy to prevent some max call stack errors feat: Make comment RegExps non-greedy to prevent some max call stack errors Oct 10, 2022
@thlorenz
Copy link
Owner

LGTM to merge, so go ahead once we publish another minor with the old regex.
Should I go ahead and publish a minor at this point?

@phated
Copy link
Collaborator

phated commented Oct 10, 2022

Should I go ahead and publish a minor at this point?

Yep! I think the final minor is ready now.

@thlorenz
Copy link
Owner

OK, published 1.9 + merged CI PR. Now we can focos on that regex stuff :)

@phated phated merged commit 2572a2f into thlorenz:master Oct 10, 2022
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