-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Avoid quotes in suggested .env file for IDEs #20144
Conversation
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 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 ```
I tried to automatically cherry-pick this change back to each relevant milestone, so that it is available in those older releases of Pants. ✔️ 2.17.xSuccessfully opened #20145. ❌ 2.18.xI was unable to cherry-pick this PR to 2.18.x, likely due to merge-conflicts. Steps to Cherry-Pick locallyTo resolve:
Please note that I cannot re-run CI if a job fails. Please work with your PR approver(s) to re-run CI if necessary. When you're done manually cherry-picking, please remove the Thanks again for your contributions! |
…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 <[email protected]>
…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 <[email protected]>
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 viadotenvy
allan2/dotenvy#11), but for now we can at least stop suggesting incorrect things.For instance, with source roots
a b/c
anddef
, this generates: