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

loc splicing does not build URIs the right way (e.g. spaces end up being not encoded when the loc is printed) #916

Open
jurgenvinju opened this issue Dec 8, 2015 · 4 comments · May be fixed by #1802
Assignees

Comments

@jurgenvinju
Copy link
Member

rascal>str myPath = "  ";
str: "  "
rascal>|hello://<myPath>|
|prompt:///|(0,18,<1,0>,<1,18>): MalFormedURI("hello://  ")
        at $shell$(|prompt:///|(0,18,<1,0>,<1,18>))
rascal>|hello:///| + myPath 
loc: |hello:///%20%20|
@DavyLandman
Copy link
Member

that could be solved by calling the correct overload of the sourceLocation method of the ValueFactory.

I think that now we first concat everything and then use new URI() on that string. Which is easier to code, but incorrect.

@DavyLandman
Copy link
Member

so it would mean that in java for the interpolated source location literal you have to find in which part (scheme, authority, path,...) the interpolation is.

@jurgenvinju jurgenvinju changed the title loc splicing does not call URI encoder loc splicing does not build URIs the right way (e.g. spaces end up being not encoded when the loc is printed) Dec 8, 2015
@jurgenvinju
Copy link
Member Author

Yes; we should change the template grammar to make sure we can store each field in the proper place (i.e. authority has a different notations from path, etc).

@jurgenvinju jurgenvinju added this to the stable release march 2020 milestone Jan 28, 2020
@jurgenvinju jurgenvinju self-assigned this Jul 7, 2022
@jurgenvinju jurgenvinju linked a pull request Jun 1, 2023 that will close this issue
jurgenvinju added a commit that referenced this issue Jun 1, 2023
jurgenvinju added a commit that referenced this issue Jun 1, 2023
@jurgenvinju
Copy link
Member Author

This is still broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants