How does pants handle dynamic imports with depende...
# general
How does pants handle dynamic imports with dependency inference? For example if we use a typing library which is bloated but we don't want that in the package for lambda deployment to minimise artefact size?
Regarding dynamic imports, there’s some options in this subsystem Not sure if that answers your question though. Your example hints at excluding dependencies, that possibly where inferred. You can do that using
in your dependencies field. See the note at the end of
👍 1
Thanks! That partially solves it, would be good to be able to dynamically set the
based on a setting, will have a look around the docs
👍 1
If there’s a select few imports you don’t want to be inferred by the dependency engine, there’s also a pragma you can apply in code:
Copy code
... # pants: ignore-dep
👍 2
My bad, it is
# pants: no-infer-dep
. It was renamed.
@bitter-ability-32190 did this feature make it into the docs..?
Hmm maybe not?
🙈 1
FYI @hundreds-father-404 the wordsmith 😛