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

Check maxTokenizationLineLength in monarchLexer #145979

Merged

Conversation

Lazyuki
Copy link
Contributor

@Lazyuki Lazyuki commented Mar 24, 2022

This PR fixes microsoft/monaco-editor#3025

The issue is described in the issue linked above, but basically when monaco-editor was parsing and tokenizing lines, it was using monarch tokenizer instead of TextMate tokenizer which was already checking the maxTokenizationLineLength option. So I added the maxTokenizationLineLength check in monarch tokenizer as well.

@ghost
Copy link

ghost commented Mar 24, 2022

CLA assistant check
All CLA requirements met.

@Lazyuki
Copy link
Contributor Author

Lazyuki commented Mar 29, 2022

Sorry for the delay, I've finally been signed off by my employer @alexdima

@Lazyuki Lazyuki force-pushed the fix-maxTokenizationLineLength-for-monaco branch from 9b97b2f to e85893c Compare April 4, 2022 17:53
@Lazyuki
Copy link
Contributor Author

Lazyuki commented Apr 4, 2022

Could I get reviews? This bug is freezing up the UIs and there's no workaround other than fixing it in the source.

@Lazyuki
Copy link
Contributor Author

Lazyuki commented Apr 7, 2022

@alexdima could you run the CI again? I rebased on the main branch since there was a conflict.

@Lazyuki Lazyuki force-pushed the fix-maxTokenizationLineLength-for-monaco branch 2 times, most recently from 84c9752 to 856618f Compare April 20, 2022 17:27
@Lazyuki
Copy link
Contributor Author

Lazyuki commented Apr 21, 2022

Hi @hediet you seem to be assigned to the original bug report issue. Could you run the CI? This bug is making the UI unresponsive for 5+ seconds sometimes.

@Lazyuki
Copy link
Contributor Author

Lazyuki commented May 4, 2022

@alexdima @hediet could I please get a review?

@Lazyuki
Copy link
Contributor Author

Lazyuki commented May 10, 2022

It seems like the Hygiene and Layering check is stuck

@alexdima alexdima force-pushed the fix-maxTokenizationLineLength-for-monaco branch from 856618f to f260b7f Compare May 11, 2022 17:56
@Lazyuki Lazyuki force-pushed the fix-maxTokenizationLineLength-for-monaco branch from f260b7f to 28f1195 Compare May 12, 2022 14:01
@Lazyuki
Copy link
Contributor Author

Lazyuki commented May 13, 2022

Looks like the recently added Code OSS check is failing on all the PRs made in the past 3 days.

@Lazyuki Lazyuki force-pushed the fix-maxTokenizationLineLength-for-monaco branch from 28f1195 to d1fcde7 Compare May 16, 2022 19:47
@Lazyuki
Copy link
Contributor Author

Lazyuki commented May 19, 2022

@alexdima hello could you run the CI?

@alexdima alexdima added this to the May 2022 milestone May 30, 2022
this._maxTokenizationLineLength = this._configurationService.getValue<number>('editor.maxTokenizationLineLength', {
overrideIdentifier: this._languageId
});
this._configurationService.onDidChangeConfiguration(e => {
Copy link
Member

Choose a reason for hiding this comment

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

Should this listener be disposed at some point?

Copy link
Member

Choose a reason for hiding this comment

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

Good point! I'll do a follow-up PR.

@alexdima
Copy link
Member

Thank you!

@alexdima alexdima merged commit acb156d into microsoft:main May 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Setting maxTokenizationLineLength has no effect
3 participants