Using EDIFACT, modifying the build.sbt to have exportJars := true.

Java 17, sbt 1.6.2,

Using daffodil 2.6.0
sbt clean test - all works

Using daffodil 3.0.0
sbt clean test - all works

Using daffodil 3.1.0 (or seemingly anything newer)
sbt clean test - fails Abort: Usage error: lengthLimitInBits.>=(0)

So 3.1.0 introduced the sensitivity to this exportJars thing.



On Fri, Mar 18, 2022 at 2:30 PM Olabusayo Kilo <ok...@owlcyberdefense.com>
wrote:

> I was also able to recreate this error in the CSV repo by adding the
> "exportJars := true" (note: false doesn't cause this error),
>
> and updating the Daffodil version to the last commit before the RC
> commit (i.e 613c2b0c077f56dbb425e7ebab1a2d154cbdbd06).
>
> so:
>
>
> exportJars :=true libraryDependencies ++=Seq(
>    "org.apache.daffodil" %%"daffodil-tdml-processor" %"3.3.0-SNAPSHOT"
> %"test",
> ---
> )
>
> So it seems to be a Daffodil error, since this doesn't happen with
> 3.0.0, but it does happen with 3.2.1
>
> Note: I'm running sbt 1.5.7 (Ubuntu Java 11.0.14), but I believe Mike
> tried several different versions when we first ran into this.
>
> On 3/18/22 13:45, Mike Beckerle wrote:
> > I tried many things, including clean git clones of all related repos.
> This
> > problem is a very bizarre interaction.
> >
> > The fact that the tests ran flawlessly under intelliJ IDEA, but failed
> > running sbt from the command line
> >
> > I searched for sbt bugs related to exportJars. I did find
> > https://github.com/sbt/sbt/issues/3119, but doesn't seem related or not
> > obviously so.
> >
> > On Fri, Mar 18, 2022 at 1:25 PM Adams, Joshua<jad...@owlcyberdefense.com
> >
> > wrote:
> >
> >> I can confirm that at least sbt clean does not resolve the issue.
> Didn't
> >> try a got clean, although I had just cloned the repo in question so I
> don't
> >> think it had gotten dirty in anyway either.
> >>
> >> Josh
> >>
> >> On Mar 18, 2022 1:22 PM, Steve Lawrence<slawre...@apache.org>  wrote:
> >> That's surprising to me. All that exportJars is supposed to to do is
> >> include or not include certains files on the class path and use packages
> >> jars instead.
> >>
> >> And that assertion that is failing is beacuase the length of test data
> >> is negative, which should never happen and I don't know how exportJars
> >> would affect that.
> >>
> >> It almost sounds like something got corrupted or needed to be rebuilt,
> >> and changing exportJars allowed that to happen? Maybe there's some
> >> conflict between using IntelliJ and sbt at the same time?
> >>
> >> I wonder if doing an sbt clean or git clean would resolve the issue.
> >>
> >>
> >> On 3/18/22 1:10 PM, Olabusayo Kilo wrote:
> >>> We noticed that only when running "sbt test" in schema projects with
> the
> >>> exportJar setting, the error below was generated resulting in failure
> of
> >>> all the tests. Note that running the same tests via IntelliJ/Junit
> >>> didn't reproduce this error, and the error was isolated to using sbt to
> >>> run the tests.
> >>>
> >>> The cause was isolated to having the "exportJars := true" setting in
> >>> build.sbt. Removing the setting removed the error, and got all tests
> >>> passing. Sending this out as an FYI in case someone else runs into this
> >>> in the future.
> >>>
> >>> [info] Test a.b.c started
> >>> [error] Test a.b.c failed: org.apache.daffodil.exceptions.Abort: Usage
> >>> error: lengthLimitInBits.>=(0)
> >>> [error] org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
> >>> [error]
> >>>
> >>
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.doParseWithBothApis(DaffodilTDMLDFDLProcessor.scala:290)
> >>> [error]
> >>>
> >>
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:248)
> >>> [error]
> >>>
> >>
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:253),
> >>> took 0.003 sec
> >>> [error]     at
> >>> org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.doParseWithBothApis(DaffodilTDMLDFDLProcessor.scala:290)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:248)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:253)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.ParserTestCase.doParseExpectSuccess(TDMLRunner.scala:1026)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:1169)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2(TDMLRunner.scala:920)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2$adapted(TDMLRunner.scala:917)
> >>> [error]     at
> >> scala.util.Either$RightProjection.foreach(Either.scala:652)
> >>> [error]     at
> >>>
> >>
> org.apache.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:917)
> >>> [error]     at
> >> org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:870)
> >>> [error]     at
> >>> org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:416)
> >>> [error]     at
> >>> org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:191)
> >>> [error]     at
> >>> org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:197)
> >>>
> >>

Reply via email to