-
Notifications
You must be signed in to change notification settings - Fork 727
UpdateDependencies to be able to update omnisharp and razor packages #2779
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2779 +/- ##
==========================================
+ Coverage 65.04% 65.13% +0.08%
==========================================
Files 104 104
Lines 4506 4506
Branches 654 654
==========================================
+ Hits 2931 2935 +4
+ Misses 1389 1386 -3
+ Partials 186 185 -1
Continue to review full report at Codecov.
|
|
@NTaylorMullen I tried to run this script using |
|
Could you share some of the context around this script? Not quite sure I understand all this goodness |
|
Whenever we have to update the dependencies in package.json we used to manually modify the urls in package.json so far. With a recent PR from @gregg-miskelly - #2766, we can use a script to do that. However as I have stated in the description of this PR, there are some subtle differences in the url that is used by the debugger packages and the ones used by omnisharp and razor due to which it would not work for us. In this PR I have made changes so that we can use this script as well. Does that make sense ? |
|
This is basically a gulp task where we can add the urls in the launch.json and it would do all the matching of the names and replace the urls and the other things like installPath using the specified url and version. |
|
Ah, I see. Ya we don't currently have a fallback url available for the last release (blame Azure Pipelines retention policy 😢). Am I reading this correctly that this also calculates the checksum for dependencies? If so that's doppppeee |
|
@NTaylorMullen Correct. The script will -
Next time you update, I would recommend adding a fall back URL on your blob storage. It has saved us a few times in the past when the CDN started misbehaving... |
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.
Otherwise LGTM
| return value.replace(regex, newValue); | ||
| } | ||
|
|
||
| function verifyMatchCount(value: string, shouldContainVersion = false): void { |
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.
nit: If I didn't write the code, I am not sure I would understand what "verifyMatchCount" does without reading the code. How about "verifyVersionSubstringCount"?
Definitely on our plate for the next release 😄 https://github.com/aspnet/Razor.VSCode/issues/257 |
The UpdateDependencies script used to match the last part of the url to match the urls against the runtimeDependencies. However the urls for omnisharp and razor include the version as well, hence the names would never directly match, so added some logic that trims the versions before performing the matching.
Also update the version in the installPath, installTestPath and the defaults property which is present in the package.json