UniFormal / MMT

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

(Deprecated, but w/o alternative) allContent throws on LFX: parse error: document path expected #439

Closed ComFreek closed 5 years ago

ComFreek commented 5 years ago
  1. Have latest devel MMT: https://github.com/UniFormal/MMT/commit/c79f19704a077111b2b9f0c6752302c1ea0c9172
  2. Have latest MMT/LFX: https://gl.mathhub.info/MMT/LFX/commit/306c5f11d9a7fd020aa38197fe9a8e5ab163261c
  3. Load the MMT/LFX archive and call allContent
    val addedArchives = ctrl.addArchive(File("path-to-lfx"))
    addedArchives.foreach(archive => {
      // Trigger reading all content into memory
      archive.allContent
    })

The following exception is thrown at runtime:

An exception or error caused a run to abort: parse error: document path expected: http://gl.mathhub.info/MMT/LFX?FeatureTest parse error: document path expected: http://gl.mathhub.info/MMT/LFX?FeatureTest at info.kwarc.mmt.api.Path$.parseD(Path.scala:441) at info.kwarc.mmt.api.archives.Archive.$anonfun$allContent$6(Archive.scala:172)

It stems from the parseD call in allContent: https://github.com/UniFormal/MMT/blob/b62c15121b232ff0eb2895c35c3b9b38be4476ff/src/mmt-api/src/main/info/kwarc/mmt/api/archives/Archive.scala#L172

ComFreek commented 5 years ago

https://github.com/UniFormal/MMT/commit/d889c17d425ab0c14ff5a3ce18bb872a6d80f51f simply ignores paths not parseable as DPaths.