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

XSpec Ant target does not work with files or directories containing space #13

Open
dmj opened this issue Jun 8, 2022 · 9 comments
Open
Labels
bug Something isn't working deferred something we expect to (or at least hope to) fix someday

Comments

@dmj
Copy link
Collaborator

dmj commented Jun 8, 2022

The pathconvert task does not URI-encode the file names. One could argue that this is not a bug, but just a limitation of the Ant target that is acceptable.

@dmj dmj added the bug Something isn't working label Jun 8, 2022
@sydb
Copy link
Member

sydb commented Jun 8, 2022

I presume we can’t just use ${xspec-files} as the value of @expression of the "files" parameter to Tests/xspec-runner.xslt, and in that program define the $files parameter as xs:string+. That would be too easy, so it can’t work, right?

@dmj
Copy link
Collaborator Author

dmj commented Jun 8, 2022

That doesn't work. From my understanding ${...} expands properties, i.e. strings. xspec-files is a identifiable resource collection.

@martindholmes
Copy link
Collaborator

martindholmes commented Sep 1, 2022

Why don't we have the xspec-runner run on itself and load the xspec files dynamically using a collection? I've always found using the xslt task in ant is a bit awkward, and I usually use the java task to call saxon directly, then have my xslt driver files load what they need.

@dmj
Copy link
Collaborator Author

dmj commented Sep 3, 2022

Do you mean the XSLT 3 collection() function?

@martindholmes
Copy link
Collaborator

@dmj Sorry this is so late! Yes, I normally use the collection() function and iterate through content in the XSLT itself.

@martindholmes
Copy link
Collaborator

Easy to reproduce, so should be easy to fix, I hope.

martindholmes added a commit that referenced this issue Dec 13, 2023
@sydb
Copy link
Member

sydb commented Dec 13, 2023

We (@HelenaSabel , @martindholmes , and I) found a partial fix for this — use a BLAH-separated, instead of space-separated, list of files, and then tokenize on BLAH. (Where in this case we chose U+241D as BLAH, but it does not really matter, any string that is guaranteed not to occur in a filepath will do.) BUT after having done this we just bumped into the problem further down the line, in the xspec build file itself. (MH to post details soon.) So we think we should pause this ticket and ask XSpec folks if there is a way to do this. (To run XSpec when there is a space in the path.)

@martindholmes
Copy link
Collaborator

What we determined was that when we call the ant target xspec.xspec in the XSpec ant build file, whatever variety of escaped or unescaped path we present to it, the call fails. The calls are done by generating our own ant file with antcall elements like this, for example:

<antcall target="xspec.xspec" inheritall="false">
            <param name="xspec.xml"
                location="/home/mholmes/temp/path%20with%20spaces/atop/Tests/xspec/functions_module.xspec"/>
            <param name="test.type" value="t"/>
            <param name="clean.output.dir" value="true"/>
        </antcall>

and the result is Target "with" does not exist in the project "null". As far as I can tell, this error results either from ant itself, which doesn't even get as far as calling the intended target, or from the XSpec build file. Still trying to figure out which of these is the problem. I think the issue may be in the way the ATOP build file is included/called from our generated xspec-runner.xml file. I think it's failing to find the XSpec build file itself. I think that perhaps instead of using exec to call ant, we should use the <ant> task itself. That would be the next thing to try.

@martindholmes
Copy link
Collaborator

martindholmes commented Dec 20, 2023

@martindholmes, @sydb, and @HelenaSabel think this is potentially a big time-sink, since we don't quite know where to look to solve the problem, and we have more important things to focus on right now, so we're going to defer this for the moment.

@sydb sydb added the deferred something we expect to (or at least hope to) fix someday label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deferred something we expect to (or at least hope to) fix someday
Projects
None yet
Development

No branches or pull requests

3 participants