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

Evaluate build files to accurately determine sources #62

Open
Tatskaari opened this issue Nov 22, 2023 · 0 comments
Open

Evaluate build files to accurately determine sources #62

Tatskaari opened this issue Nov 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Tatskaari
Copy link
Collaborator

Right now, puku grungily handles a couple of expressions for srcs, specifically, it will evaluate globs, and resolve srcs that are other build targets. This has a couple shortcomings:

  1. We don't follow require/provide for sources
  2. We don't handle other expression types such as variables, or list concatenations.

We should be able to evaluate build files to determine the sources passed to each rule. This evaluation mode is different to how Please evaluates a file. When we encounter a build rule we care about, we want to preserve the args passed to it for later.

  1. Begin evaluation by walking the AST, interpreting the top level statements
  2. When we encounter a function call at the top level that matches one of our configured kinds, register the rule with the package. We should store the AST for the Call expression, as well as the evaluated arguments.
  3. Evaluate the build function to resolve the build definition to its build_rule()s

We will then have far more information about the build targets we're updating, including the resolved arguments passed to the build definition, and require/provide information.

@Tatskaari Tatskaari added the enhancement New feature or request label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant