UniFormal / MMT

The MMT Language and System
https://uniformal.github.io/
Other
68 stars 22 forks source link

build system crash #539

Closed kohlhase closed 3 years ago

kohlhase commented 3 years ago

In MathHub/MiKoMH/IWGS/source/course/notes I did mmt make pdflatex notes.tex and got the following error report:

tex-deps-result: up-to-date /Users/kohlhase/localmh/MathHub/MiKoMH/AI/tex-deps/course/en/questionnaire-call.deps
tex-deps-result: success /Users/kohlhase/localmh/MathHub/MiKoMH/IWGS/tex-deps/course/fragments/lecturing.deps
tex-deps-result: success /Users/kohlhase/localmh/MathHub/MiKoMH/IWGS/tex-deps/course/fragments/preliminaries.deps
Exception in thread "Thread-0" java.lang.AssertionError: assertion failed
    at scala.Predef$.assert(Predef.scala:208)
    at info.kwarc.mmt.stex.STeXAnalysis.mhReposClosure(STeXAnalysis.scala:73)
    at info.kwarc.mmt.stex.STeXAnalysis.mhReposClosure$(STeXAnalysis.scala:59)
    at info.kwarc.mmt.stex.LaTeXBuildTarget.mhReposClosure(LaTeXBuildTarget.scala:22)
    at info.kwarc.mmt.stex.STeXAnalysis.matchPathAndRepo(STeXAnalysis.scala:163)
    at info.kwarc.mmt.stex.STeXAnalysis.matchPathAndRepo$(STeXAnalysis.scala:91)
    at info.kwarc.mmt.stex.LaTeXBuildTarget.matchPathAndRepo(LaTeXBuildTarget.scala:22)
    at info.kwarc.mmt.stex.STeXAnalysis.$anonfun$mkSTeXStructure$1(STeXAnalysis.scala:261)
    at info.kwarc.mmt.stex.STeXAnalysis.$anonfun$mkSTeXStructure$1$adapted(STeXAnalysis.scala:252)
    at scala.collection.Iterator.foreach(Iterator.scala:941)
    at scala.collection.Iterator.foreach$(Iterator.scala:941)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
    at info.kwarc.mmt.stex.STeXAnalysis.mkSTeXStructure(STeXAnalysis.scala:252)
    at info.kwarc.mmt.stex.STeXAnalysis.mkSTeXStructure$(STeXAnalysis.scala:244)
    at info.kwarc.mmt.stex.LaTeXBuildTarget.mkSTeXStructure(LaTeXBuildTarget.scala:22)
    at info.kwarc.mmt.stex.STeXAnalysis.getDeps(STeXAnalysis.scala:237)
    at info.kwarc.mmt.stex.STeXAnalysis.getDeps$(STeXAnalysis.scala:234)
    at info.kwarc.mmt.stex.LaTeXBuildTarget.getDeps(LaTeXBuildTarget.scala:22)
    at info.kwarc.mmt.stex.LaTeXBuildTarget.readingSource(LaTeXBuildTarget.scala:120)
    at info.kwarc.mmt.stex.LaTeXBuildTarget.estimateResult(LaTeXBuildTarget.scala:145)
    at info.kwarc.mmt.api.archives.BuildQueue.buildDependency(BuildQueue.scala:467)
    at info.kwarc.mmt.api.archives.BuildQueue.$anonfun$getNextTask$4(BuildQueue.scala:406)
    at info.kwarc.mmt.api.archives.BuildQueue.$anonfun$getNextTask$4$adapted(BuildQueue.scala:406)
    at scala.collection.immutable.List.foreach(List.scala:392)
    at info.kwarc.mmt.api.archives.BuildQueue.info$kwarc$mmt$api$archives$BuildQueue$$getNextTask(BuildQueue.scala:406)
    at info.kwarc.mmt.api.archives.BuildQueue$$anon$1.run(BuildQueue.scala:257)
kohlhase@kwarc-pool1 notes % 

I am using the newest master built from git.

lambdaTotoro commented 3 years ago

Reproducible. I'll get on that.

lambdaTotoro commented 3 years ago

This error seems to occur when there's a dependency on a file in an archive that's not present locally. On my machine, this stopped reproducing after I mmt lmh installed both MiKoProblems/GenCS and MiKoProblems/CompLog. These are not listed in the the list of dependencies in MiKoMH's META-INF, but probably should be (?).

@kohlhase, could you check if this has a similar source with you? Your list of missing archives will likely be different, but if you build the 539-hotfix branch and grep the output of your mmt command for "HOTFIX", it should tell you which archive is (supposedly) missing.

If there is another mechanism to find an archive's dependencies, that mechanism might have a bug to explain this crash. But I don't know about that (yet).

kohlhase commented 3 years ago

The MiKoProblems/{GenCS,CompLog} are present on my machine, so that is probably not the problem. But I have added the dependencies. BTW, see https://gl.kwarc.info/Marian6814/stexls/-/issues/18 for dependency management.

lambdaTotoro commented 3 years ago

You can check still use the Hotfix branch to find out which ones are missing on your machine for now.

I'll add some proper error reporting for this on devel.

lambdaTotoro commented 3 years ago

devel now throws error instead of crashing as of commit b7c5264795a36500b03687b9563a1ad4994ae80f, closing.

kohlhase commented 3 years ago

interestingly, this now works on devel. Thanks a lot for the fix.

lambdaTotoro commented 3 years ago

That leads me to believe that there's something else going on because I didn't do anything besides the error reporting. I guess we'll see when/if it rears its head again.