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

support following symlinks #414

Open
edavidaja opened this issue Apr 25, 2023 · 1 comment · May be fixed by #546
Open

support following symlinks #414

edavidaja opened this issue Apr 25, 2023 · 1 comment · May be fixed by #546
Labels

Comments

@edavidaja
Copy link
Collaborator

edavidaja commented Apr 25, 2023

In my case, the app.py is a symlink to a file in the parent directory (long story, but there is a good reason for this). When rsconnect deploys an app, does it follow local symlinks so that the content is deployed to the server?
The reason I have symlinks is because I have many apps in the same directory (named app_basic.py, app_recipes.py, etc.) and I want to deploy the apps individually, but I think rsconnect wants them to be named app.py. So I made a directory for each with symlinks from foo/app.py to the original file, like app_basic.py.
Why are they all in the same directory? Because they share common submodules, like utils.py, chat/init.py, and so on.

When constructing the list of files to bundle we currently rely on os.path.isfile so symlinks are not followed.

@jcheng5
Copy link
Contributor

jcheng5 commented Feb 22, 2024

For the user's original problem, the --entrypoint argument can be used to deploy specific app files (--entrypoint app_basic:app).

We have another reason for wanting the bundler to follow symlinks, which is having a data/ directory that's a sibling to an app directory (so the app has to do ../data/foo.csv or whatever). If symlinks were followed, then the app directory could contain a symlink to ../data and have it bundled correctly.

@jcheng5 jcheng5 linked a pull request Feb 22, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants