-
Notifications
You must be signed in to change notification settings - Fork 8
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
"Apparent recursion within a with_prototype action: 25000 context sanity limit hit" #51
Comments
I'm not getting this on my end. Does this happen no matter the file contents or only when using nested syntaxes (i presume that's why it's complaining about |
I‘m getting it in Dev Build 3166. It happens with any file, even completely empty; it seems as if it may occur during a phase prior to the point of application, like it‘s validating/processing/compiling and that pops up. |
I don't have a license so I can't access the dev build channel, but this could have to do with the new I would think that disabling the rule associated with the interpolation match in the syntax_AFTER_OPEN context would prevent ST from thinking there's any recursion, this one: Ecmascript-Sublime/ecmascript.sublime-syntax Line 5528 in e203d3a
|
Same problem here... using latest sublime build.. Tried commenting the line @blake-regalia mentioned, but it dit no fix =( |
@rafapaulin Did you only comment out that line or the whole rule? I should have highlighted the range, try commenting out these 5 lines: Ecmascript-Sublime/ecmascript.sublime-syntax Lines 5528 to 5532 in e203d3a
|
I have another hunch. It's possible that the Sublime devs thought of making Ecmascript-Sublime/ecmascript.sublime-syntax Lines 5687 to 5698 in e203d3a
|
@blake-regalia tried to comment out both ranges you suggested, appart from each other and together... still did not fix =( |
I may share my sublime license with you if you need |
I don’t know much about the new nesting stuff — am I understanding correctly that it is a breaking change in Sublime? Like, is it even possible to have the nested syntaxes working in both current Sublime 3 and the dev build? |
@bathos it should not be a breaking change, and could have just been a bug in 3166 -- looking at the current dev build changelogs seems like there were some crash issues w 3166, does this still happen in the most recent build? |
3167 and 3168 still exhibit the same behavior (sorry I haven’t been able to experiment with this properly myself yet, just been busy w/ work) |
3170 is now stable and released, so I believe this now affects all users, womp. Gonna look into it tonight. |
Confirmed that it’s related to nested syntax by fully disabling them — gonna try to re-enable bit-by-bit to see when it freaks out. |
...it’s the markdown one :o |
I published the easy fix (disabling nested markdown) till we can figure out why this happens. There’s nothing obvious to me; it seems like it’s got to be something unique about the Markdown syntax definition triggering it. |
This is most certainly caused by https://github.com/sublimehq/Packages/blob/master/Markdown/Markdown.sublime-syntax#L993 which loads contexts from Ecmascript, which then includes contexts from Markdown, when then loads contexts from Ecmascript, which then includes contexts from Markdown, .... at least, that is my suspicion: sublimehq/sublime_text#2252 I will see if switching to |
I think/thought this is possible, but I’m not sure what the correct way to do it is. The registry repo is Package Control Channel, where you’ll see our entry complete with the typo {
"name": "Ecmascript Syntax",
"details": "https://github.com/bathos/Ecmascript-Sublime",
"labels": [ "Javascript", "ES6", "ES2105" ],
"releases": [
{
"sublime_text": ">=3084",
"tags": true
}
]
}, In the releases array, If you look around at other entries, you’ll see that many specify a
So we can’t use the |
I think I found an example that does it with tags — apparently it can specify a prefix: {
"name": "ChineseLocalizations",
"previous_names": ["ChineseLocalization"],
"details": "https://github.com/rexdf/ChineseLocalization",
"labels": ["localization", "chinese", "中文", "japanese", "日本語"],
"releases": [
{
"sublime_text": "<3000",
"tags": "st2-"
},
{
"sublime_text": ">=3000",
"tags": "st3-"
}
]
}, Their tags list looks like this. |
Interesting, it looks like you can also use "releases": [
{
"sublime_text": "<3000",
"branch": "st2"
},
{
"sublime_text": ">=3000",
"tags": true
}
] Although they are using 'branch' for the alternate instead of tags. The better question is, why doesn't Package Control have this documented somewhere? |
That example is tags vs branch. I didn’t see any with tags unprefixed + tags prefixed, but I didn’t search for very long so I dunno. (I’m surprised that I couldn’t find any of this documented — I might just be missing it?) |
Found it:
It's in their example-repository.json. |
New changes don't use embed and are backwards-compatible so no need for tags yet. |
I’m told this has begun again. My guess is that it was triggered indirectly by changes in one of the delegated syntaxes, though I won’t be able to check which till later :/ |
Can anyone share a snippet that causes this? Also what version of Sublime? I'm running build 3176 and am not able to get any errors. |
I’ll try to get some more info. Two people messaged me directly about it today. My impression was that, as before, no file even needs to be open — it just happens from the extension existing at all. |
Hmm... just looked through all the latest base syntax package commits that might affect this and found: CSS, SQL, and ShellScript syntaxes changed in last few weeks, the only suspicious commit being for bash at this line here: sublimehq/Packages@4cfa7b9#diff-fe682d41416db7dad26aa8c60e0dc02eR300 so I cloned it and tested, but no problems. I'll wait for more info. |
Hi there! So I was one of those two people to message about this. I have the Ecmascript syntax installed on ST3.1.1 build 3176. Steps to reproduce:
Another example I caught while opening a JS file: |
Thanks @acconrad , can you please confirm which version of the "Ecmascript Syntax" package you have installed? Ctrl+Shift+P > "Package Control: List Packages" > "Ecmascript Syntax". EDIT: I suspect you have an outdated version since we recently removed nested Markdown support, mainly for this very reason. |
This is a tricky one -- not sure what's causing it but I went ahead and published a release that might fix it. Please restart Sublime, check that it updates Ecmascript Syntax to v1.6.7 and then see if the problem still exists. |
@blake-regalia unfortunately no change, and I verified I now have 1.6.7 :( |
Hmm - I'm still unable to reproduce this no matter what I try, but I have some ideas about diagnosis, @acconrad . This should help us narrow it down:
```js
call();
```
|
@blake-regalia It did blow up on Step 4. I followed it to the tee, but I only had a |
Interesting... What are the errors you got this time? Could you post a screenshot? |
Btw @acconrad for our own sanity, and to get you coding again in the meantime, I created a branch without nested syntax support. Here's how you can install it: cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/
git clone -b safe-mode https://github.com/bathos/Ecmascript-Sublime ecmascript Then, View > Syntax > Open all with current extension as... > User > Ecmascript |
Thanks for going deep on this blake, it’s very appreciated. I haven’t been able to repro either unfortunately. |
@bathos I figured this out. Oddly enough, it appears that ST 3176 may or may not (depending on your OS it seems) load the Ecmascript syntax as the default I'm going to disable the affected nested syntaxes for now: DOT and HTML. Unfortunately, it seems that we cannot nest any syntax that ultimately embeds or pushes a As a remedy, I'm going to look into generating a compatible HTML, DOT, and Markdown syntax directly from the base syntaxes. That way we can just ship our own "safe" nested syntaxes. |
@blake-regalia you are awesome, thank you for diving into this! |
@bathos I drafted a release for 1.7.0, but want to make sure it doesn't break anything else incidentally. Could you update your local repo and check that everything looks good? |
Released 1.7.0 |
Sorry I missed that last request @blake-regalia ... but wow! This is a crazy impressive update (and everything seems to be fine). |
May have spoken too soon. I’ve seen no highlighting issues, but it seems that shortcuts for commenting out lines (both single and multi) have stopped working. If you can confirm (not 100% sure ES Sublime is the cause yet) I’ll open a new issue. |
Hmm I can't seem to reproduce this yet. I just noticed some old scopes on a few .tmPreferences files and patched them real quick, see if that did anything? |
This was fixed by the new release! Thanks again. 🙇 |
Unsure if this is a Sublime issue or an issue introduced in the last release, but presently the syntax def is unloadable for me.
The text was updated successfully, but these errors were encountered: