ome / omero-blitz

Gradle project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
0 stars 15 forks source link

Updated build.gradle to use zeroc local plugin #7

Closed rgozim closed 5 years ago

rgozim commented 5 years ago

closes #3

jburel commented 5 years ago

Included in omero-build

A problem occurred configuring project ':omero-blitz'.
> Could not resolve all artifacts for configuration ':omero-blitz:classpath'.
  > Could not find gradle.plugin.com.zeroc.gradle.ice-builder:slice:1.5.0-SNAPSHOT. 
joshmoore commented 5 years ago

In my build, I see:

/home/omero/.m2/repository/com/zeroc/gradle/ice-builder/slice/1.5.0-SNAPSHOT/maven-metadata-local.xml
/home/omero/.m2/repository/com/zeroc/gradle/ice-builder/slice/1.5.0-SNAPSHOT/slice-1.5.0-SNAPSHOT.pom
/home/omero/.m2/repository/com/zeroc/gradle/ice-builder/slice/1.5.0-SNAPSHOT/slice-1.5.0-SNAPSHOT.jar

attempting to remove the "gradle.plugin" prefix.

joshmoore commented 5 years ago

The plugin seems to be found now, but I don't see any extra Python output. Does this need a new task with a new parameter (or similar)?

jburel commented 5 years ago

After unzipping the blitz-python zip under lib/fallback (so I did not override other files), and trying to start the server:

bin/omero start
Traceback (most recent call last):
  File "bin/omero", line 102, in <module>
    import omero.cli
  File "/src/dist/lib/python/omero/cli.py", line 52, in <module>
    from omero.util.concurrency import get_event
  File "/src/dist/lib/python/omero/omero/__init__.py", line 8, in <module>
    import omero_API_ice
  File "/src/dist/lib/fallback/omero_API_ice.py", line 24, in <module>
    import omero_RTypes_ice
  File "/src/dist/lib/fallback/omero_RTypes_ice.py", line 24, in <module>
    import omero_model_IObject_ice
  File "/src/dist/lib/fallback/omero_model_IObject_ice.py", line 591, in <module>
    ('_id', (), _M_omero._t_RLong, False, 0),
AttributeError: 'module' object has no attribute '_t_RLong'
jburel commented 5 years ago

Trying to start the server:

Traceback (most recent call last):
  File "bin/omero", line 102, in <module>
    import omero.cli
  File "/src/dist/lib/python/omero/cli.py", line 52, in <module>
    from omero.util.concurrency import get_event
  File "/src/dist/lib/python/omero/util/__init__.py", line 25, in <module>
    import omero.ObjectFactoryRegistrar as ofr
  File "/src/dist/lib/python/omero/ObjectFactoryRegistrar.py", line 10, in <module>
    class AcquisitionModeObjectFactory(Ice.ObjectFactory):
  File "/src/dist/lib/python/omero/ObjectFactoryRegistrar.py", line 12, in AcquisitionModeObjectFactory
    from omero_model_AcquisitionModeI import AcquisitionModeI
  File "/src/dist/lib/python/omero_model_AcquisitionModeI.py", line 1
    """
    ^
IndentationError: unexpected indent
jburel commented 5 years ago

all the generated classes have one space at the beginning of every line This is not the case with the "old" build. This is the source of the problem above

rgozim commented 5 years ago

This line of code is responsible for outputting language files from the .combined files:

https://github.com/rgozim/omero-blitz-plugin/blob/e0dc0e6fa22f74a027c693a1ecef7ff8e7987e0c/src/main/groovy/org/openmicroscopy/blitz/tasks/SplitTask.groovy#L164

The regex may need changed.

The previous build.xml used to do:

        <macrodef name="split-combined">
            <attribute name="all" default="all"/>
            <attribute name="prefix"/>
            <attribute name="todir"/>
            <element name="filesetAndMapper" implicit="true"/>
            <sequential>
            <copy todir="@{todir}" encoding="utf-8" outputencoding="utf-8">
                <filesetAndMapper/>
                <filterchain>
                    <linecontainsregexp>
                        <regexp pattern="^\[@{all}\]|^\[@{prefix}\]"/>
                    </linecontainsregexp>
                    <tokenfilter>
                        <replaceregex pattern="^\[@{all}\]\s?" replace=""/>
                        <replaceregex pattern="^\[@{prefix}\]\s?" replace=""/>
                    </tokenfilter>
                </filterchain>
            </copy>
            </sequential>
        </macrodef>
jburel commented 5 years ago

The indent problem is now gone. Error when attempting to start the server

File "/src/dist/lib/python/omero_model_IObject_ice.py", line 591, in <module>
    ('_id', (), _M_omero._t_RLong, False, 0),
AttributeError: 'module' object has no attribute '_t_RLong'
joshmoore commented 5 years ago
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]:

:+1:

jburel commented 5 years ago

So the previous error is no longer there i.e. 'module' object has no attribute '_t_RLong' now we have

  File "/src/dist/lib/python/omero_model_AcquisitionModeI.py", line 30, in AcquisitionModeI
    details=_field_info_data(wrapper=omero.proxy_to_instance, nullable=True),
AttributeError: 'module' object has no attribute 'proxy_to_instance'
joshmoore commented 5 years ago

Corrected with https://github.com/openmicroscopy/openmicroscopy/pull/5934/commits/f5cd8d8ab583dffc325cadbf0fbc0ad28aed7bc2

joshmoore commented 5 years ago

Merging to get omero-build uptodate.