-
Notifications
You must be signed in to change notification settings - Fork 6k
Patches 1.70 #5422
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
Patches 1.70 #5422
Conversation
@fritterhoff first, thank you so much for doing this! This is a huge help 🎉 @code-asher since you have more context on some of these patches, do you mind reviewing? |
For sure, some further work will be required... Esp. fixing the telemetry seems to be a bit cumberstone |
Thanks for getting us started! I will hopefully have time later this week to finish it out. 🤞 |
d73ed22
to
a51136b
Compare
FYI: I just rebased my branch on the code-server main branch. Sadly the CI needs an approval again 😉 |
Codecov Report
@@ Coverage Diff @@
## main #5422 +/- ##
=======================================
Coverage 72.44% 72.44%
=======================================
Files 30 30
Lines 1673 1673
Branches 366 366
=======================================
Hits 1212 1212
Misses 398 398
Partials 63 63 Continue to review full report at Codecov.
|
I'm going to try adding a label to this PR which should auto-rebase (I think) and even deploy your PR to npm. Let's give it a try. UPDATE: looks like I still have to Approve each time :/ I'll be out Thurs/Fri so @code-asher can help if you need an approval |
Alright. Maybe it would help if a dummy PR created by me gets merged... According to GitHub only first time contributors require approval 🤣 |
From my point of view the e2e tests did fail due to an internal error and not due to my changes? |
Also remove it from script-src since it is invalid anyway.
Also no need to set the key since it will be in the migration (and even if not it will be set by the next function call).
Just to keep it consistent with the other imports. We initially added the patch like this so it was not part of the upgrade but might as well fix it now.
Awesome work @fritterhoff, I implemented the telemetry and everything else looks great (I just added back some comments and made two other small tweaks not really related to the update). Going to do a bit more testing then open this as ready for review. |
Display language is not working for me, maybe there is some conflict between our patch and the stuff upstream has been adding. Ideally we would use upstream's but they mentioned their implementation is not quite ready so we might need to look into how to cut it out for now. |
Great thanks for the feedback and sorry about the comments... in a first step I was happy that I had a working version 1.70 😉
I'm not sure what the expected behavior is or what isn't working here? I only tried to install a language pack and that was working 😁 So feel free to give me a hint what got broken in the new version 😉 |
Here is the behavior I see (I ran from the latest
linux-amd64.tar.gz artifact from CI):
- Launch code-server
- Extensions > Search "Japanese"
- Click "Set display language"
- Click "Restart"
- Still in English
Interestingly I just tried with Spanish and it worked. I also
tried Chinese but it did *not* work. Which language pack did you
try?
It is also interesting that the button says "set display language"
now instead of "install" like it used to.
Lastly, when I run "configure display language" from the command palette
only English shows for me. It is not showing all the language packs I have
installed.
|
Hi, I tried the German language pack. That worked fine. I'll check it again later and update my comment |
So spanish and German work at least in the Installation fine. Chinese does not work. |
1.70 might have broken our language patch :( at least that's what we were discussing offline. Thank you for testing those and reporting back! |
Well ok. I sort of expected something like that 😔 |
I should have time to look into it this week if no one else gets
to it first.
|
1ec6a70
to
7592cb1
Compare
fdf6899
to
92a6ca2
Compare
Language issues should be sorted, I will do a final check on the CI artifact once it is ready then merge. |
* Update upstream Code to 1.70 * Update CSP hashes * Update comment on remote authority Also remove it from script-src since it is invalid anyway. * Use absolute path for disable download patch Just to keep it consistent with the other imports. We initially added the patch like this so it was not part of the upgrade but might as well fix it now. * Fix inability to change language while code-server is running Co-authored-by: Asher <[email protected]>
+ // Add a unique ID based on the current path for per-workspace databases. | ||
+ // This prevents workspaces on different machines that share the same domain | ||
+ // and file path from colliding (since it does not appear IndexedDB can be | ||
+ // scoped to a path) as long as they are hosted on different paths. | ||
+ return this.payload.id + '-' + hash(location.pathname.toString().replace(/\/$/, "")).toString(16); |
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.
Will this commit affect the migration/state collisions e2e test we have?
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.
Nope it operates the same way; things just moved around a little bit.
@@ -108,7 +108,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts | |||
import { Schemas } from 'vs/base/common/network'; | |||
import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess'; | |||
import { IProductService } from 'vs/platform/product/common/productService'; | |||
+import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService'; | |||
+import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; |
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.
Nice catch! I don't know why i didn't do that before lol thanks for fixing.
+ // This must not use Node's require otherwise it will be cached forever. | ||
+ // Code can get away with this since the process actually restarts but | ||
+ // that is not currently the case with code-server. | ||
+ return JSON.parse(fs.readFileSync(configFile, "utf8")); |
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.
Nice fix! How did you figure this out?
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.
I actually fixed this before but it was lost when we switched to the fork so basically I was stepping through the code until suddenly I remembered this issue.
The first time around it just involved stepping through the code one step at time to figure out why the language object was empty until I arrived at this line and realized it would never update since requires are cached. I am not sure where that knowledge came from, probably read it somewhere or maybe it was from when we implemented tarfs which hijacks require.
Hello :)
I started playing around with the new version 1.70. Some patches must be adjusted...
languagePacks.ts
now contains the following fragment(?):Feel free to close the PR if my changes don't help at all 😉