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

Specifying deps outside of BUILD files (aka "dep inference") #6449

Closed
nsaechao opened this issue Sep 4, 2018 · 9 comments
Closed

Specifying deps outside of BUILD files (aka "dep inference") #6449

nsaechao opened this issue Sep 4, 2018 · 9 comments
Assignees

Comments

@nsaechao
Copy link
Contributor

nsaechao commented Sep 4, 2018

The canonical way of specifying dependencies in Pants is through the BUILD file. Currently this limits the entry to barrier for wiring in new tools/plugins that natively has its own way of tracking dependencies. Such is the case for Node.js dependency management through NPM/Yarn (#6332). There can be an argument that BUILD should be the source of truth, but I feel that is impractical given the resources it may take to support something like node.js package management. There should be a way to infer dependencies outside of BUILD files that is easily extensible to other formats.

@nsaechao
Copy link
Contributor Author

nsaechao commented Sep 4, 2018

+@stuhood

@stuhood stuhood self-assigned this Sep 4, 2018
@stuhood
Copy link
Sponsor Member

stuhood commented Sep 4, 2018

Thanks Ny... will get to this this week.

@stuhood
Copy link
Sponsor Member

stuhood commented Sep 9, 2018

I believe that #4535 blocks this, which is itself blocked by #6170. I'm going to focus on landing #6170, and then implementing #4535. The actual work involved in this issue once those are fixed is fairly small.

@nsaechao
Copy link
Contributor Author

In the current state of node source-level dependencies, users have to specify dependencies both in the package.json and the BUILD file. Although it is a minor inconvenience, the process is prone to user error and increases the barrier to utilizing source dependencies with node targets. Adding something like dependency inference is not an impediment to migrating to source dependencies with node targets. However, I do believe that adding something like dep inference earlier would help smooth user transition to using JS source deps and help build trust with the new dependency specification.

@stuhood
Copy link
Sponsor Member

stuhood commented Nov 28, 2018

Refreshed the branch here: master...twitter:stuhood/dep-inference .

The largest blockers for landing this afaict (labeled with TODOs in the branch), are:

@stuhood
Copy link
Sponsor Member

stuhood commented Dec 3, 2018

Shipping the extract_imports binary to http://github.com/pantsbuild/binaries and fetching it using the DownloadFile intrinsic in a portable way (which maybe @illicitonion could help us spec out as a followup to #6672...?)

I think that doing this in a more principled is going to require getting Options incorporated (#5869). Given that, I think that I might just continue to work on Options this week rather than really focusing here.

@stuhood
Copy link
Sponsor Member

stuhood commented Sep 19, 2019

Status update: the last remaining rough edge for this is #4535, but it's not a blocker. Enough of the community wants this that we can land whatever support we need to and then maintain it even as we move forward with #4535.

@stuhood stuhood changed the title Specifying dependencies outside of BUILD files Specifying dependencies outside of BUILD files (aka "dep inference") Sep 19, 2019
@stuhood stuhood changed the title Specifying dependencies outside of BUILD files (aka "dep inference") Specifying deps outside of BUILD files (aka "dep inference") Sep 19, 2019
@Eric-Arellano
Copy link
Contributor

@stuhood closed?

@stuhood
Copy link
Sponsor Member

stuhood commented Jul 9, 2020

Heck yes. Thank you @Eric-Arellano.

@stuhood stuhood closed this as completed Jul 9, 2020
@stuhood stuhood assigned Eric-Arellano and unassigned stuhood Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants