Archived

This forum has been archived. Please start a new discussion on GitHub.

After 3.7.1 update, slice2cpp is not handeling *.ice wildcards anymore

Hello,

we have an command line build for our C++ part of our services. For a first evaluation of getting up to 3.7.1 we tried to test this build scripts with the new slice2cpp.exe compiler.

Unfortunately we are discovering a error while we are using wildcards as we used them until now.
Our setting would be something like this:
"C:\Program Files\ZeroC\Ice-3.7.1\bin\slice2cpp" --debug -I "C:\Program Files\ZeroC\Ice-3.7.1\Slice" -I "C:\Dev\Slice" --add-header "stdafx.h" --source-ext "cpp" --header-ext "h" --include-dir "SliceInclude" --output-dir "C:\Dev\Generated" "C:\Dev\Slice\*.ice"

This is now getting following error:
C:\Program Files\ZeroC\Ice-3.7.1\bin\slice2cpp: error: cannot open 'C:/Dev/Slice/*.ice' for reading

If we are trying adding each filename as full path manually, then it works:
"C:\Program Files\ZeroC\Ice-3.7.1\bin\slice2cpp" --debug -I "C:\Program Files\ZeroC\Ice-3.7.1\Slice" -I "C:\Dev\Slice" --add-header "stdafx.h" --source-ext "cpp" --header-ext "h" --include-dir "SliceInclude" --output-dir "C:\Dev\Generated" "C:\Dev\Slice\A.ice" "C:\Dev\Slice\B.ice"

But we have so many slice files, our build script is also stop working, if we try to insert them all as full qualified filename.
Is this a desired behavior, that there is no wildcard support anymore? In 3.6.2 it worked like a charm.

Best Regards
Aikson

Comments

  • xdm
    xdm La Coruña, Spain

    Hi,

    Slice compilers don't expand expands wildcards and never did, that is typically done by the shell or command prompt.

    For Windows command line builds you must want to check Ice Builder for MSBuild and if you are using Visual Studio you should also check Ice Builder for Visual Studio

  • Hello,

    I tried to do the same calls in an open Windows command line, with the slice2cpp (or others, like slice2js, slice2cs) from 3.7.1, I become the error as written above:
    C:\Program Files\ZeroC\Ice-3.7.1\bin\slice2cpp: error: cannot open 'C:/Dev/Slice/*.ice' for reading

    If I'm only switching around the slice2cpp (or other) compiler to the version from 3.6.2 everything is working as expected and as we are using it since 2-3 years.
    I do not think, that the Microsoft Windows command line would change an expansion of the wildcard between this two calls?

    I know the IceBuilder for MSBuild, because we are using it in our C# builds, but we use other compilers for C++ so we are bound to an command line build there.

    Best Regards,
    Aikson

  • xdm
    xdm La Coruña, Spain

    Can you post the command using for your test, the results and the Slice files in the directory

  • Hello,

    in the zip file are all *.ice files, and all results, if I test it with a 3.6.2 compiler.

    My calls for this are:
    C#
    C:\Program Files (x86)\ZeroC\Ice-3.6.2\bin>slice2cs -I "C:\Program Files (x86)\ZeroC\Ice-3.6.2\slice" -I "C:\Dev\TempICE\Slice" --output-dir "C:\Dev\TempICE\CS" "C:\Dev\TempICE\Slice\Training\*.ice"

    CPP
    C:\Program Files (x86)\ZeroC\Ice-3.6.2\bin>slice2cpp -I "C:\Program Files (x86)\ZeroC\Ice-3.6.2\slice" -I "C:\Dev\TempICE\Slice" --output-dir "C:\Dev\TempICE\CPP" "C:\Dev\TempICE\Slice\Training\*.ice"

    JS
    C:\Program Files (x86)\ZeroC\Ice-3.6.2\bin>slice2js -I "C:\Program Files (x86)\ZeroC\Ice-3.6.2\slice" -I "C:\Dev\TempICE\Slice" --output-dir "C:\Dev\TempICE\JS" "C:\Dev\TempICE\Slice\Training\*.ice"

    If I try to do it with the 3.7.1 compiler I get everytime:
    C#
    C:\Program Files (x86)\ZeroC\Ice-3.7.1\bin>slice2cs -I "C:\Program Files (x86)\ZeroC\Ice-3.7.1\slice" -I "C:\Dev\TempICE\Slice" --output-dir "C:\Dev\TempICE\CS" "C:\Dev\TempICE\Slice\Training\*.ice"

    slice2cs: error: cannot open 'C:/Dev/TempICE/Slice/Training/*.ice' for reading

    CPP
    C:\Program Files (x86)\ZeroC\Ice-3.7.1\bin>slice2cpp -I "C:\Program Files (x86)\ZeroC\Ice-3.7.1\slice" -I "C:\Dev\TempICE\Slice" --output-dir "C:\Dev\TempICE\CPP" "C:\Dev\TempICE\Slice\Training\*.ice"

    slice2cpp: error: cannot open 'C:/Dev/TempICE/Slice/Training/*.ice' for reading

    JS
    C:\Program Files (x86)\ZeroC\Ice-3.7.1\bin>slice2js -I "C:\Program Files (x86)\ZeroC\Ice-3.7.1\slice" -I "C:\Dev\TempICE\Slice" --output-dir "C:\Dev\TempICE\JS" "C:\Dev\TempICE\Slice\Training\*.ice"

    slice2js: error: cannot open 'C:/Dev/TempICE/Slice/Training/*.ice' for reading

    Best Regards,
    Aikson

  • xdm
    xdm La Coruña, Spain

    Hi Aikson,

    Thanks for reporting the issue I was able to reproduce it, I have open a issue in github https://github.com/zeroc-ice/ice/issues/296

    I will push a fix shortly and it will be part of upcoming 3.7.2

    Cheers,
    José

  • Hi José,

    nice to hear you could reproduce the problem and I see that the issue is already fixed in GitHub.
    We are happy to check the new version with our system, if you could provide us with an preview build.

    Do you have a rough time schedule for the upcoming 3.7.2 release?

    Best Regards,
    Aikson

  • xdm
    xdm La Coruña, Spain

    Hi,

    We aim to release 3.7.2 by the end of the year, If you want to build the new version check build instructions at https://github.com/zeroc-ice/ice/tree/3.7/cpp#building-ice-for-windows