bright-monitor-59146
07/20/2023, 3:32 AMsrc
package structure for each lambda. Each lambda will (eventually) have a dependency on a library that we are also developing - I have also used poetry to set up the src
layout for this library. In my pants.toml
file I have my source roots defined as:
[source]
marker_filenames = ["pyproject.toml"]
I also went with a single lockfile for the repo because the number of third party dependencies across all of the Lambdas + shared library code is somewhat small (around 6 or so currently). My question is this - what’s the “standard practice” way to tell Pants that the Lambdas will have a shared dependency that’s in the same monorepo? ie - is this handled via BUILD file modification, or should I be doing something with pyproject.toml
in the Lambda package directories (ie 1. specifying a local distribution, or 2. packaging the shared library up, sending it to our gitlab package registry, then listing this shared library as any other 3rd party dependency in pyproject.toml)careful-address-89803
07/20/2023, 3:39 AMimport lib0
and Pants will pull in the lib0 source. ./pants dependencies
should show you if it's being picked up.bright-monitor-59146
07/20/2023, 3:42 AMcareful-address-89803
07/20/2023, 3:45 AMcareful-address-89803
07/20/2023, 3:45 AMbright-monitor-59146
07/20/2023, 3:49 AMbright-monitor-59146
07/31/2023, 3:29 AM./pants dependencies ::
i’m getting warnings worded something like “we can’t safely infer which target this dependency is for” if some lambdas share 3p dependencies (which i have declared/added via poetry)