-
Notifications
You must be signed in to change notification settings - Fork 293
refactor: feature names inside double quotes if containing a .
#3594
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
base: main
Are you sure you want to change the base?
Conversation
It doesn't work with [feature.'"test'.'test"'.dependencies]
bat = "*" |
sorry, @ruben-arts, my bad! is it because the quotes are being included in the string rather than being treated as delimiters? Using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe for simplicity and reuse we could just have function or struct to escape a string? I assume there are more reasons to add quotes to keys?
yup I get the point, so should I write a generalised function like |
Makes sense! |
Still results in: [feature.'"test'.'test"'.dependencies]
bat = "*" It would be good to add a simple integration test to figure out that the manifest can still be read after the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @mrswastik-robot !
I think it would be cool to have an integration test that will verify if we do pixi add test.test
it can still be parsed when using pixi run
You can take a look at the bootstrapping of the test project in test_main_cli.py
from tests/integration_python folder and combine it with running the task test from test_run_cli.py
Lmk if you have any questions
hi @nichmor @ruben-arts, I think I found the issue here. Integration test revealed that the current solution still results in
so, this results in double escaping...ig the solution is to let the TOML library handle the escaping by keeping parts separated, an example would be like this:
Would love to hear your feedback on this. |
Letting the TOML library handle it sounds great! |
hey @mrswastik-robot ! I checked out your branch, and if I do and then
I still have the error. Is it expected? |
yes, this was expected, I haven't pushed the solution yet, I will push it as soon as it's ready...the approach I am following is to let the TOML library handle the escaping |
7a16559
to
2cc01e2
Compare
fixes #3171
Code refactored is in
table_name.rs
:Had to use
leak()
otherwise I was facing lifetime error.Also added a test case, it's passing.