-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
IDE setup docs gives an .env
file that doesn't work
#20127
Comments
huonw
changed the title
IDE setup suggest gives an
IDE setup docs gives an Nov 1, 2023
.env
file that doesn't work.env
file that doesn't work
huonw
added a commit
that referenced
this issue
Nov 3, 2023
This fixes #20127 by avoiding double quotes in the `.env` file generated by the code snippet in the IDE set-up docs. Double quotes aren't supported by the `scie-pants` `.env` loader, and a line containing them was previously silently ignored (plus all lines after), but with scie-pants 0.11.0, will be an error. See pantsbuild/scie-pants#307 and pantsbuild/scie-pants#319. The new suggestion has _no_ quotes at all, because there's no other way to have a line that includes a substitution. To handle source roots with spaces in their paths, this has to also manually escape them. Supporting double quotes is effectively a new feature of `scie-pants` launcher (via scie jump a-scie/jump#166 via `dotenvy` allan2/dotenvy#11), but for now we can at least stop suggesting incorrect things. For instance, with source roots `a b/c` and `def`, this generates: ``` PYTHONPATH=./a\ b/c:./def:$PYTHONPATH ```
WorkerPants
pushed a commit
that referenced
this issue
Nov 3, 2023
This fixes #20127 by avoiding double quotes in the `.env` file generated by the code snippet in the IDE set-up docs. Double quotes aren't supported by the `scie-pants` `.env` loader, and a line containing them was previously silently ignored (plus all lines after), but with scie-pants 0.11.0, will be an error. See pantsbuild/scie-pants#307 and pantsbuild/scie-pants#319. The new suggestion has _no_ quotes at all, because there's no other way to have a line that includes a substitution. To handle source roots with spaces in their paths, this has to also manually escape them. Supporting double quotes is effectively a new feature of `scie-pants` launcher (via scie jump a-scie/jump#166 via `dotenvy` allan2/dotenvy#11), but for now we can at least stop suggesting incorrect things. For instance, with source roots `a b/c` and `def`, this generates: ``` PYTHONPATH=./a\ b/c:./def:$PYTHONPATH ```
WorkerPants
pushed a commit
that referenced
this issue
Nov 3, 2023
This fixes #20127 by avoiding double quotes in the `.env` file generated by the code snippet in the IDE set-up docs. Double quotes aren't supported by the `scie-pants` `.env` loader, and a line containing them was previously silently ignored (plus all lines after), but with scie-pants 0.11.0, will be an error. See pantsbuild/scie-pants#307 and pantsbuild/scie-pants#319. The new suggestion has _no_ quotes at all, because there's no other way to have a line that includes a substitution. To handle source roots with spaces in their paths, this has to also manually escape them. Supporting double quotes is effectively a new feature of `scie-pants` launcher (via scie jump a-scie/jump#166 via `dotenvy` allan2/dotenvy#11), but for now we can at least stop suggesting incorrect things. For instance, with source roots `a b/c` and `def`, this generates: ``` PYTHONPATH=./a\ b/c:./def:$PYTHONPATH ```
This was referenced Nov 3, 2023
huonw
added a commit
that referenced
this issue
Nov 3, 2023
…20146) This fixes #20127 by avoiding double quotes in the `.env` file generated by the code snippet in the IDE set-up docs. Double quotes aren't supported by the `scie-pants` `.env` loader, and a line containing them was previously silently ignored (plus all lines after), but with scie-pants 0.11.0, will be an error. See pantsbuild/scie-pants#307 and pantsbuild/scie-pants#319. The new suggestion has _no_ quotes at all, because there's no other way to have a line that includes a substitution. To handle source roots with spaces in their paths, this has to also manually escape them. Supporting double quotes is effectively a new feature of `scie-pants` launcher (via scie jump a-scie/jump#166 via `dotenvy` allan2/dotenvy#11), but for now we can at least stop suggesting incorrect things. For instance, with source roots `a b/c` and `def`, this generates: ``` PYTHONPATH=./a\ b/c:./def:$PYTHONPATH ``` Co-authored-by: Huon Wilson <huon@exoflare.io>
huonw
added a commit
that referenced
this issue
Nov 3, 2023
…20145) This fixes #20127 by avoiding double quotes in the `.env` file generated by the code snippet in the IDE set-up docs. Double quotes aren't supported by the `scie-pants` `.env` loader, and a line containing them was previously silently ignored (plus all lines after), but with scie-pants 0.11.0, will be an error. See pantsbuild/scie-pants#307 and pantsbuild/scie-pants#319. The new suggestion has _no_ quotes at all, because there's no other way to have a line that includes a substitution. To handle source roots with spaces in their paths, this has to also manually escape them. Supporting double quotes is effectively a new feature of `scie-pants` launcher (via scie jump a-scie/jump#166 via `dotenvy` allan2/dotenvy#11), but for now we can at least stop suggesting incorrect things. For instance, with source roots `a b/c` and `def`, this generates: ``` PYTHONPATH=./a\ b/c:./def:$PYTHONPATH ``` Co-authored-by: Huon Wilson <huon@exoflare.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Per pantsbuild/scie-pants#307, the script on https://www.pantsbuild.org/docs/setting-up-an-ide#first-party-sources results in a file with quote around the env var, but this (silently) doesn't work with scie-pants:
We could adjust the script to generate the same code without the quotes.
pants/docs/markdown/Using Pants/setting-up-an-ide.md
Lines 26 to 29 in 0e3523d
Pants version
2.17, 2.18, main
OS
N/A
Additional info
This would also be resolved by adjusting scie-pants to handle parsing
"
'd env vars.The text was updated successfully, but these errors were encountered: