Skip to content
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

Contextual queries: Support running when the library pack is in the package cache #1735

Merged
merged 5 commits into from
Nov 9, 2022

Commits on Nov 7, 2022

  1. Configuration menu
    Copy the full SHA
    b526ff4 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. AST viewer: Support running when the library pack is in the package c…

    …ache
    
    If the library pack containing the AST query does not have
    a lock file, it is likely to be in the package cache, not
    a checkout of the CodeQL repo.
    In this case, use `codeql pack resolve-dependencies`
    to create a temporary lock file, and `codeql pack install`
    to install the dependencies of this library pack.
    
    This allows the CLI to resolve the library path and
    dependencies for the AST query before running it.
    adityasharad committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    f9a19b6 View commit details
    Browse the repository at this point in the history
  2. AST viewer: Address review comments

    Clear the CLI server's pack cache before installing packs,
    to avoid race conditions where the new lock file is not
    detected during query running.
    
    Adjust some helper methods.
    adityasharad committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    639487b View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. Contextual queries: Factor common code for resolving and running

    Shared by the AST viewer, jump to def, and find references
    contextual queries.
    
    This allows contextual queries to have their dependencies
    resolved and be run whether the library pack is in the
    workspace or in the package cache.
    adityasharad committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    84b9d9c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97c985b View commit details
    Browse the repository at this point in the history