-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Store and apply overrides
per-compiler
#6497
base: main
Are you sure you want to change the base?
Conversation
There are 2 languages with default overrides: rust and tablegen. One of the effects of this PR is that the overrides button initially has green highlight for these languages. |
@@ -345,6 +345,7 @@ export class CompilerFinder { | |||
preamble: props<string>('licensePreamble'), | |||
}, | |||
possibleOverrides: [], | |||
activeOverrides: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too confusing of a name, once this is transmitted to the frontend this object should not ever change. But then the Default overrides are also already in possibleOverrides
, so I'm not sure what's the point of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand this.
IIUC this (compiler-finder stuff) runs only on instance startup. Why shouldn't activeOverrides
change afterwards?
And what better name would you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's supposed to represent the static configuration on the backend for everyone, not an individualized state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Will take another stab at this, probably next weekend
@@ -316,6 +316,10 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co | |||
|
|||
this.revealJumpStack = []; | |||
|
|||
if (this.compiler) { | |||
this.compiler.activeOverrides = state.overrides; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best to store this somewhere else like the global https://github.com/compiler-explorer/compiler-explorer/blob/main/static/global.ts#L30 , or in local storage if you want it to persist beyond refreshes
Fixes #5755 and maybe others.