borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
558 stars 18 forks source link

25000 context sanity limit hit for java syntax #181

Open YuriGor opened 5 years ago

YuriGor commented 5 years ago

Naomi breaks native java syntax highlighter:

error: Error loading syntax file "Packages/Java/Java.sublime-syntax": Apparent recursion within a with_prototype action: 25000 context sanity limit hit

If I disable Naomi package - everything starts to work. Enable back - a lot of errors happens and java code become plain white.

Since Java code example is proprietary, I'll send it to you by email.

YuriGor commented 5 years ago

related discussion, may be interesting for you: https://forum.sublimetext.com/t/syntax-highlighting-problem-with-3113-apparent-recursion-within-a-with-prototype-action-25000-context-sanity-limit-hit/19914/29

borela commented 5 years ago

The error usually happens with the builtin PHP, Markdown and LateX syntaxes, it started when they did a major upgrade in the latest version of sublime, they included source.js into their contexts and this in turn makes sublime go beyond the 25k contexts.

For PHP and Markdown, I included a syntax that does not present this issue(I'll probably remove them after the build system is in place).

Avoid using the builtin PHP, Markdown and Latex syntaxes if possible, otherwise you'll have to wait for the build system to be finished. I am updating it as fast I can trying to balance my work schedule but this one will be a major change.

mIcHyAmRaNe commented 5 years ago

i installed Laravel Blade Highlighter & Naomi. and i have same problem when i open .blade.php files :

Apparent recursion within a with_prototype action: 25000 context sanity limit hit

screenshot from 2018-10-17 23 47 47 disabling or removing Naomi resolve the problem but that's the last thing that i want to do

25,000 context limit is too low #1687 deleting HTML syntax the project will fix it?

I think you have to do a little clean in your code and lighten up a little

borela commented 5 years ago

I think you have to do a little clean in your code and lighten up a little

That's already in progress and it's a big change.

The problem was a wrong assumption about external files like I do here, I thought sublime would insert a reference to that file but the reality is that sublime copies the contents of the referenced file and any reference to other files in that file, recursively.

It's not that the code is not clean or heavy, it's just that sublime's syntax system duplicates the code everytime I use the include statement.

cibulka commented 5 years ago

Any updates on this issue? The problem persists for me.

luco commented 4 years ago

Can't use until this get fixed.

ryanpcmcquen commented 4 years ago

Any news here?

seplveda commented 3 years ago

I think you have to do a little clean in your code and lighten up a little

That's already in progress and it's a big change.

The problem was a wrong assumption about external files like I do here, I thought sublime would insert a reference to that file but the reality is that sublime copies the contents of the referenced file and any reference to other files in that file, recursively.

It's not that the code is not clean or heavy, it's just that sublime's syntax system duplicates the code everytime I use the include statement.

Hi Borela, nice work with Naomi, just rocks. But I'm still having the 25.000 limit with LaTeX.

TechSage369 commented 2 years ago

Disable JavaScriptNext - ES6 syntax

actually it is creating an error

pryley commented 2 years ago

Disable JavaScriptNext - ES6 syntax

actually it is creating an error

This was the solution! Install the Babel package instead.