Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating site on windows, exception - file referencing incorrect? #499

Closed
chipbite opened this issue Apr 25, 2024 · 2 comments
Closed

Comments

@chipbite
Copy link

chipbite commented Apr 25, 2024

See #463.
Same exception. Likely a regression.

It works for me when I use the custom binaries that I got from @dirkgroot Jan 9 and Jan 10th, as reported here:
#463 (comment)

The latest release 1.2.5, however, has the same error, even with java 21. From my terminal:

C:\code\c4-demo-stuff\>java --version
openjdk 21.0.2 2024-01-16 LTS
OpenJDK Runtime Environment Microsoft-8905927 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Microsoft-8905927 (build 21.0.2+13-LTS, mixed mode, sharing)

C:\code\c4-demo-stuff\>java.exe -cp C:\temp\structurizr-site-generatr\1.2.5\lib\* nl.avisi.structurizr.site.generatr.AppKt generate-site -w c4-bank-demo-simplified.dsl
Components...
Exception in thread "main" java.nio.file.InvalidPathException: UNC path is missing sharename: /\index.html
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:132)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
        at java.base/java.nio.file.Path.of(Path.java:148)
        at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt.writeHtmlFile(SiteGenerator.kt:218)
        at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt.access$writeHtmlFile(SiteGenerator.kt:1)
        at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt$generateHtmlFiles$1$1.invoke(SiteGenerator.kt:129)
        at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt$generateHtmlFiles$1$1.invoke(SiteGenerator.kt:129)
        at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt$generateHtmlFiles$2.invoke(SiteGenerator.kt:184)
        at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt$generateHtmlFiles$2.invoke(SiteGenerator.kt:184)
        at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt.generateHtmlFiles$lambda$21(SiteGenerator.kt:184)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

C:\code\c4-demo-stuff\>

So this is what I have tested, and results so far:

OS generatr v java v Result
win10 1.1.7 17 Fail 🔴
win10 April 9 fix 17 Fail 🔴
win10 April 9 fix 21 Success 🟢
win10 April 10 fix 17 Success 🟢
win10 April 10 21 Success 🟢
win10 1.2.5 21 Fail 🔴

The failure is - again - the exception mentioned above and in the OP of #463.

@jp7677
Copy link
Collaborator

jp7677 commented May 23, 2024

Sorry for the late response. Version 1.2.5 was tagged on April 9th, https://github.com/avisi-cloud/structurizr-site-generatr/releases/tag/1.2.5 , but the fix for this issue was committed on April 11th, 81a14bc , so what you see is expected since this version doesn't contain the fix.
That said, we want to create a release in the near future, so please stay tuned. The good news is that the new version will likely contain another Windows related fix (#506).

@jp7677 jp7677 closed this as completed May 23, 2024
@chipbite
Copy link
Author

Aha, that sounds very promising, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants