-
Notifications
You must be signed in to change notification settings - Fork 196
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
Nested target feature needs to support windows path in project_loc expansion #652
Comments
See Bug 578429
As |
…s path in project_loc expansion Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
That seems reasonable, and much quicker than either of my options. However, the URI for a Windows path would be
Regarding this, would it mean that |
Oh wow, that was fast! Thanks a lot, I will try to ping the PDE side too so that hopefully both sides are compatible in Eclipse 4.23/Tycho 2.7 (or 2.6.1 if this is considered relevant enough to make a point release). |
Target loc should always point to the absolute path of the current target file, but we first need to convince the PDE people to actually enhance the support (currently it refers to the location of the current active target location if it is a file). So if you consider it useful or have any remarks drop a comment in the referenced bug to let other people know this is an issue for you. |
I'll prepare a patch for PDE if we have verified it works on Tycho.
Tycho 2.7 will be released soon so I don't think there is much need for 2.6.1 release. If you like you can try to came up with an example and provide an integration-test to demonstrate the issue, but all tests run on linux so one might need to adjust one of the existing tests to use a "windows style" linux path. |
Hmm actually But perhaps I should raise a separate issue for that, since the "working on Windows" part is indeed fixed by your patch. |
I will just add a unit test for the conversion of your example that might be sufficient already. |
…s path in project_loc expansion Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
I think this is not really a path component but a shell escape character, as far as I know java do not use the escapes internally in string representations. |
No, I mean that a file in Linux can legitimately be called $ touch 'my text\data.txt'
$ cat my\ text\\data.txt
$ ls
'my text\data.txt' pom.xml target.refs test.bundle However, as I said, this can be raised as a separate issue regarding file paths with special chars, since this patch should indeed fix my original issue. Thanks a lot! |
Could you try out the current tycho (3.0.0-SNAPSHOT) snapshot build if the problem is fixed there? |
project_loc expansion Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Cherry picked to 2.7.0 branch. |
I confirm it works both on Windows and Linux. Many thanks for the super quick turnaround!
|
This issue is related to the new feature of nested target files introduced by #401 . Both in Tycho and in PDE, when referring to a local file the syntax is supposed to use a file: URI for a local file, and relative paths are heavily discouraged because they refer to the actual CWD, not to the project/workspace root. Thus, the example project refers to the nested target file using the
${project_loc}
Eclipse variable that expands to the absolute path of a project:However, when trying to run this build on Windows, I get the following error:
It appears that
${project_loc}
is being expanded using Windows-native backslashes, which is not acceptable when the path is going to be part of a URI. The same problem appears in PDE, and it prevents the nested target functionality from being usable in either environment, as I have not found any feasible workarounds for the issue.My suggestion would to implement one of two options,:
${X_uri}
variables parallel to project_loc, workspace_loc, etc. that are guaranteed to expand to a valid URI, thus something likefile:/C:/path/with/forward/slashes
in WindowsEither case would have to apply also to PDE (see issue in progress) in order to have a fully compatible environment with Tycho.
Environment info:
The text was updated successfully, but these errors were encountered: