refined-addition-5364412/14/2021, 11:07 AM
targets won't update itself by taking into account the changes in the provided 3rd party dependencies.
Whenever I run
, if it fails because of some missing 3rd party dependency, it keeps failing even after I add that 3rd party dependency to say
./pants run <pex_target>
. Is this expected?
enough-analyst-5443412/14/2021, 11:58 AM
? What is the import statement in the sources of the
that needs to import from that dependency? Do the two align? If not, you are probably missing a module mapping. If none of the
sources actually import from the dependency (some form of dynamic loading is used), you will need to add an explicit dependency to the
or one of the
targets it depends on. Both of these cases are described in more detail here: https://www.pantsbuild.org/docs/python-third-party-dependencies see "How dependencies are chosen".
If none of that addresses your issue, we probably need more detailed information.
refined-addition-5364412/14/2021, 1:18 PM
. It did complain that it can't find the imported module. I even added the target generated from
as a dependency explicitly but that didn't fix it either.
What "fixed" it was when I switched git branch, which is weird. Now it works, but I can't say that this is repeatable.
enough-analyst-5443412/14/2021, 1:27 PM
refined-addition-5364412/14/2021, 1:27 PM
is in a "non-standard" location
BUT: if you place yourin a non-standard location (or give it another name via the
requirements.txtargument), you will need to configure
python_requirements(source=..)to restart for edits to the non-standard filename: see #9946.
enough-analyst-5443412/14/2021, 1:29 PM
refined-addition-5364412/14/2021, 1:32 PM
This did, in fact, bite at least one person with a file at src/requirements.txt.https://github.com/pantsbuild/pants/pull/9946/files#r602436641
hundreds-father-40412/14/2021, 3:21 PM