<@U051221NF> Hey, just saw you've added instructio...
# general
s
@happy-kitchen-89482 Hey, just saw you've added instructions for pycharm, thanks. But wanted to ask, have you considered setting up a dev target like lerna (https://lerna.js.org/ javascript/typscript mono-repo tool). 'lerna bootstrap' create symlinks between all the dependent packages allowing you to develop and debug without any fancy setup. Develop using symbolic links, and then package and run for running unit tests, E2E and deployment.
w
it looks like lerna might relate a bit to the VSCode-only tool that @refined-dusk-58376 linked yesterday: https://marketplace.visualstudio.com/items?itemName=folke.vscode-monorepo-workspace
is the idea that after creating a lerna layout, you can open that layout with an unmodified/no-plugin IDE?
hm. from watching

https://www.youtube.com/watch?v=p6qoJ4apCjA

, it seems like you need a yarn workspace to “scope” what gets loaded in lerna?
s
you aren't required to use yarn/npm workspaces, it's just a nicety. I'm talking specifically about the bootstrap command. Javascript projects expect libraries to be the the "node_modules" directory, and lerna bootstrap creates symlinks from node_modules folders to the corresponding package. But the goal is "pants bootstrap" sets up your local project such that it is ready to run. E.g. I have an app in my monorepo that requires 3 packages in my monorepo. After calling 'pants bootstrap' I can now run 'app.py' and it magically has access to the local library packages as source. I'm fairly new to python so maybe its not possible to duplicate what you get with lerna, node_modules, and symlinks. But if it is possible, I am a huge fan of that simplified development model.
w
got it. so perhaps the python equivalent would be to export a virtualenv specific to some scope / set of targets
s
that sounds about right. I'm not a guru on venvs but if it's possible to have a pants goal where I can call 'pants bootstrap myapp', and now in PyCharm I can start single stepping though code without having to add any breakpoint code or even do remote debugging at all.
w
How many source roots do you have in your repository?
s
Right now in my project I have 5 applications and 1 shared library they all use.
w
got it. but by source root i mean: https://www.pantsbuild.org/docs/source-roots
it’s possible to have anywhere between 1 project per source root, and hundreds of projects under 1 source root
s
sorry, right now i have each as a source root. But am new to python so I could be doing it wrong.