Archived

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

Slice Linux/Windows Inconsistencies

We use Slice in RH7E Linux and Windows. I notice several inconsistencies between them:

  1. In Windows, Slice2Java Ant Task automatically removes "orphaned" files when rebuilding, but Linux does not. To repeat this:
    a. Create an interface slice definition and add a method.
    b. Build Java files using Ant
    c. Now remove the method definiion
    d. Rebuild Java files using Ant
    e. On Linux, you find an extra callback file, which cannot be compiled, related to the method you removed. On Windows this file is considered "orphaned" and is deleted.

  2. In Windows, IceBuilder automatically includes core paths required to build most slice definitions (references to Ice.slice). Linux does not include these paths and they have to be added manually through the plug-in paths list.

Sorry this is kind of a "double-ticket".

Comments

  • xdm
    xdm La Coruña, Spain

    Hi Stephen,

    Thanks from bringing this issues to our attention

    Can you clarify what Ice installation are you using on Windows and on Linux, 3.7.0 RHEL7 rpms and Windows 3.7.0 MSI?

    In Windows, IceBuilder automatically includes core paths required to build most slice definitions (references to Ice.slice). Linux does not include these paths and they have to be added manually through the plug-in paths list.

    is this related to ant builder or gradle builder?

  • bernard
    bernard Jupiter, FL

    As you can see from the commit history on the ice-builder-gradle and ice-builder-ant repos, we've been working much more with gradle than ant recently.

    If you're not sure which build system to use for your Ice Java applications, I would suggest gradle with the Ice Builder gradle plugin.

    All the best,
    Bernard

  • For the moment I removed Ice Builder and setup an Eclipse build step to manually erase the entire generated_slice folder and rebuild it from scratch whenever a slice file is changed. This only takes about 1 second and we rarely change slice files so we have what seems to be a good work around.

    That said I'll try to answer your questions and give you more information about the problems I saw. I tested this with various versions (3.6.3 on Windows and 3.6.4 on Linux). I don't think this matters as this seems to be an issues with the Ice Builder plug in. To get more specific, here is what I saw when I modified a file and triggered Ice Builder to automatically build:

    Windows:
    slice2java.exe --output-dir=generated_slice --list-generated -Islice -IC:\Program Files (x86)\ZeroC\Ice-3.6.3\slice --underscore ...(my files)

    In Linux (from memory):
    I got a similar command, but it was missing the Linux equivalent of "-IC:\Program Files (x86)\ZeroC\Ice-3.6.3\slice" for Linux. I was able to work around this by manually adding the path to the list of includes in IceBuilder.

    As far as Ant vs. Gradle goes, we've been using Ant since the project's start years ago. While switching to Gradle isn't out of the question and might be the right move, its not something we are prepared to do right this moment. I guess this sounds like you are moving to drop support for Ant in the future?

  • Using this alternate scheme in Eclipse has been causing a fair number of problems. I recently got the latest version of Ice-Builder and it seems like it has fixed the problem. We are going to do more testing with it and will update.