https://pantsbuild.org/ logo
#development
Title
# development
a

ancient-vegetable-10556

11/12/2021, 10:50 PM
OK, here’s a weirdness:
Copy code
13:46:50.38 [ERROR] Completed: Compile with javac - core/test/com/googlecode/guice/OSGiContainerTest.java:tests failed (exit code 1).
core/test/com/googlecode/guice/OSGiContainerTest.java:138: error: incompatible types: Properties cannot be converted to Map<String,String>
      Framework framework = frameworkFactory.newFramework(properties);
                                                          ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
I can’t find a version of
org.osgi.framework.FrameworkFactory
that every took
Properties
as a param, but this seems to live quite happily in the Guice repo. (ping @witty-crayon-22786 @fast-nail-55400)
this is literally the last Guice compilation error
Oh:
Copy code
// This test may fail if it is not run from ant, or if it is not run after ant has
  // compiled & built jars. This is because the test is validating that the Guice jar
  // is properly setup to load in an OSGi container
w

witty-crayon-22786

11/13/2021, 12:06 AM
hmmmm. yea, i’m ok with punting on that one and calling 90% very accomplished for
guice
, heh
great stuff.
could be that it requires scoping …?
f

fast-nail-55400

11/13/2021, 12:28 AM
does the jar need a specific manifest (or other metadata) to comply with OSGI requirements?
if guice.jar is built with that repo’s regular tooling, how does that jar’s manifest differ from the Pants-produced jar?
w

witty-crayon-22786

11/13/2021, 12:30 AM
OSGi is runtime, afaik
failing to compile makes me think that it either should or shouldn’t be present at compiletime… or that there is a compiler plugin involved
e

enough-analyst-54434

11/13/2021, 12:33 AM
The version of felix being pulled in is somehow wrong I'd guess. Latest guice pulls in 3.0.5 which has signature compatible with Properties (unparameterized Map): https://github.com/apache/felix-dev/blob/org.apache.felix.framework-3.0.5/src/main/java/org/osgi/framework/launch/FrameworkFactory.java#L71
f

fast-nail-55400

11/13/2021, 1:02 AM
the lockfile has 3.0.5 in it:
Copy code
{
        "coord": {
            "group": "org.apache.felix",
            "artifact": "org.apache.felix.framework",
            "version": "3.0.5",
            "packaging": "jar"
        },
        "directDependencies": [],
        "dependencies": [],
        "file_name": "org.apache.felix.framework-3.0.5.jar",
        "file_digest": {
            "fingerprint": "d9ca5d5862763634a57f6e9601961326ea2169942af645cccfcbf7be88464c6d",
            "serialized_bytes_length": 389227
        }
    },
e

enough-analyst-54434

11/13/2021, 1:06 AM
K - perhaps a 2nd source then in that lock and its 1st on classpath.
As Stu said - welcome back old evils.