Skip to content

Remove tutorial-lib folder#6

Merged
elenatanasoiu merged 5 commits intomainfrom
elena/remove-tutorial-lib
Feb 22, 2023
Merged

Remove tutorial-lib folder#6
elenatanasoiu merged 5 commits intomainfrom
elena/remove-tutorial-lib

Conversation

@elenatanasoiu
Copy link
Copy Markdown
Contributor

@elenatanasoiu elenatanasoiu commented Feb 16, 2023

Related: github/vscode-codeql#2090

When a user goes through the Code Tour, we select a dummy csv database
for them to get them up and running.

Once they complete the code tour and would like to continue writing
queries, they will need to add their own database.

After they do that, we check the language of their new database and
generate a skeleton QL pack for them so that they don't need to create
these files by hand. See 1 for details.

This skeleton pack folder will be called
codeql-custom-queries-<language> and it comes with its own example
query: example.ql.

When we try to run this example query, the query gets confused about
which dbscheme to pick, as it sees a qlpack.yml file in the new
skeleton pack folder, as well as one in the existing tutorial-lib
folder.

So we'll need to get rid of the tutorial-lib folder in order to make room
for new queries to be run once the tour is complete.

This also depends on triggering a codeql pack install command in
order to install real library dependencies for tutorial-queries, since we no
longer have the dummy library in tutorial-lib.

@elenatanasoiu elenatanasoiu changed the title Remove tutorial-lib folder Remove tutorial-lib folder Feb 16, 2023
@elenatanasoiu elenatanasoiu force-pushed the elena/remove-tutorial-lib branch from 2bff0d8 to 1d6585d Compare February 16, 2023 18:11
@elenatanasoiu elenatanasoiu requested review from a team and adityasharad February 16, 2023 18:16
Copy link
Copy Markdown
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks fine to me, with the caveat of my previous comment and also that this is still experimental and we need to see how this works.

We're going to get rid of this folder, but we want to keep these
two files so that we're able to run our query in `tutorial.ql`.

So we're moving these files in `tutorial-queries`.
Since we're deleting tutorial-lib, we'll need a way to point at our
dbscheme.

We were initially doing this in tutorial-lib/qlpack.yml.

We're now doing this in tutorial-queries/qlpack.yml.
@elenatanasoiu elenatanasoiu force-pushed the elena/remove-tutorial-lib branch 3 times, most recently from 0206ad2 to c8e4d43 Compare February 21, 2023 12:57
So that we can take advantage of any newer versions.
Copy link
Copy Markdown
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Based on our pairing session, this is working.

@elenatanasoiu elenatanasoiu merged commit 6fc3290 into main Feb 22, 2023
@elenatanasoiu elenatanasoiu deleted the elena/remove-tutorial-lib branch February 22, 2023 11:56
shati-patel added a commit that referenced this pull request Mar 17, 2023
We no longer need to copy these files over as of #6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants