Add configuration option to turn off skeleton pack generation#2359
Add configuration option to turn off skeleton pack generation#2359elenatanasoiu merged 21 commits intomainfrom
Conversation
9e6fe9c to
e99f5ef
Compare
shati-patel
left a comment
There was a problem hiding this comment.
Looks good overall, thanks! 🍫 🥐
I've just left some questions inline about the "format" of the config option ⚙
|
I really like that we're making this configurable. I'm sorry for being nit-picky about the definition of it, but since this is going to become user configuration, we want to be extra sure about it because we want to avoid changing it in the future. |
No need to apologise @robertbrignull! I enjoy getting feedback from you 👍 |
In the next commit we will write to this setting when the user chooses to disable the QL pack generation and prefers to never be asked again about it.
By writing the setting to our new `codeQL.autogenerateQlPacks` setting.
We modify both these options in the beforeEach(). We should reset them in the afterEach().
To make it clear what it's supposed to be storing.
I initially started defining an enum, but I'm not able to import it in package.json, where the list of options is defined (under `codeQL.createQuery.autogenerateQlPacks`).
0d684e8 to
d242117
Compare
|
Thanks for the great explanations @shati-patel & @robertbrignull! 🙇♀️ I've had to rebase to account for file changes in the extension. Bar any CI woes, this is ready for a re-review. |
shati-patel
left a comment
There was a problem hiding this comment.
Thanks for the updates! ✨ A few more places to change, using the new enum 😎
c2a0b62 to
f10185a
Compare
|
Thanks @shati-patel ❤️ I think it should be correct now. |
Nice! Looks good to me. @robertbrignull, can I punt over to you for a final review/approval? (Since you suggested the new structure 🎈) |
robertbrignull
left a comment
There was a problem hiding this comment.
I've had another look through and on the second look I've spotted a few things that could use some more attention. I think this PR is definitely heading in the right direction, but we risk making more bugs for ourselves and a confusing interface for users if we try to go too fast.
Since it's not defining a real option, we can get rid of it.
53d313e to
8220541
Compare
And update descriptions for them.
8220541 to
9ecb503
Compare
robertbrignull
left a comment
There was a problem hiding this comment.
One comment that needs updating after we changed the definition of things, but otherwise LGTM from just looking at the code.
I have tried to test this and I can't get the code to trigger, but I think it's because I'm not used to working with the codespace. Have you tested this, especially since we made a lot of modifications in review?
ffd3e76 to
a85d9d1
Compare
Yes, you have to uncomment I've just tested this and the setting was written correctly. I also tested that we stop asking if the setting is set to "never". I can follow up with a recording. Thanks for the thorough review! |
|
Here's a recording of the functionality: |
We'd like to make auto generation of QL packs the default behaviour in the extension.
We have two flows at the moment that only work in the codespaces-codeql template:
CodeQL: Create querycommandFor the second flow, we should offer the user a third option called "No, and never ask me again".
This will disable auto generation. We are writing this choice to a VS Code setting called
codeQL.createQuery.autogenerateQlPacksand checking for it before deciding whether to prompt the user again.Screen.Recording.2023-04-19.at.18.51.47.mov