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
Move upgrades into standard library packs #7166
base: main
Are you sure you want to change the base?
Conversation
|
This looks fine by me, though I think we need to get some eyes from the languages team on this before merging. It would be very nice if we could avoid having the language server try to reconcile any |
@aeisenberg Could the language server simply treat |
|
Does the language server issue only happen if the user opens a |
|
It only happens in the specific file you open. |
I'm sure it's possible to do this. I'm not sure how much effort would be involved or if it would be worth it since these scripts are usually write-only. From your perspective how often do you find that you have to interact with upgrade scripts? |
|
If the issue only happens when opening an upgrade file, I'd prefer that it not block this PR. |
|
It will have to be implemented separately. This requires a change to the language server. |
Right, I meant "not block this PR or the |


This PR moves the upgrade scripts for C#, C++, Java, JavaScript, and Python into the corresponding standard library packs (the same pack that contains the dbscheme).
Having upgrades in a separate pack gives us little or no advantage, and increases the overhead of package management. We wind up with the standard library (say,
codeql/cpp-all) depending on another library pack (codeql/cpp-upgrades), but the version number of that dependency always needs to be kept in sync with the version number of the upgrade pack. In addition, no other pack for that language would have any reason to declare a dependency on the upgrade pack, so no query pack would ever have a reason to depend on a version of the upgrade pack other than the one that was published at the same time as that version of the library pack. By simply merging the packs we ensure that the right upgrade scripts are always available without having to keep two package versions in sync.The actual changes were as follows:
<lang>/upgradesto<lang>/ql/lib/upgradesverbatim.upgrades: upgradesproperty toqlpack.ymlfor each standard library pack.qlpack*.ymlfor upgrade packs.The corresponding internal PR fixes up the build system to handle the change.
Note that Ruby already put its upgrades in its standard library.
I have not yet applied the same change to Go. I'll do that in a follow-up PR to avoid having three PRs that need to be merged simultaneously.
The text was updated successfully, but these errors were encountered: