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

Error in Diagram Synthesis #2166

Closed
jjrev opened this issue Jan 25, 2024 · 7 comments · Fixed by #2174
Closed

Error in Diagram Synthesis #2166

jjrev opened this issue Jan 25, 2024 · 7 comments · Fixed by #2174
Labels
bug Something isn't working help wanted Extra attention is needed windows Related to the Microsoft Windows platform
Milestone

Comments

@jjrev
Copy link

jjrev commented Jan 25, 2024

Using VSCode on Windows 11 with JDK 17 installed, I see the following error message when I try to display the diagram for a given *.lf file (doesn't matter which):

An exception occurred during diagram synthesis\
java.nio.file.InvalidPathException: Illegal character [:] in path at index 4: \\\c:\Users\xxxxxxxx\Development\lingua-franca\test\C\src\Deadline.lf
\
    at java.base/sun.nio.fs.WindowsPathParser.nextSlash(WindowsPathParser.java:212)
\
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:111)
\
    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:232)
\
    at java.base/java.nio.file.Path.of(Path.java:147)
\
    at org.lflang.generator.CodeMap$Correspondence.tag(CodeMap.java:144)
\
    at org.lflang.ast.ASTUtils.toText(ASTUtils.java:693)
\
    at org.lflang.generator.ReactionInstance.<init>(ReactionInstance.java:70)
\
    at org.lflang.generator.ReactorInstance.createReactionInstances(ReactorInstance.java:758)
\
    at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:902)
\
    at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:882)
\
    at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:105)
\
    at org.lflang.diagram.synthesis.LinguaFrancaSynthesis.transform(LinguaFrancaSynthesis.java:322)
\
    at org.lflang.diagram.synthesis.LinguaFrancaSynthesis.transform(LinguaFrancaSynthesis.java:144)
\
    at de.cau.cs.kieler.klighd.syntheses.AbstractDiagramSynthesis.transform(AbstractDiagramSynthesis.java:220)
\
    at de.cau.cs.kieler.klighd.syntheses.ReinitializingDiagramSynthesisProxy.transform(ReinitializingDiagramSynthesisProxy.java:289)
\
    at de.cau.cs.kieler.klighd.ViewContext.update(ViewContext.java:454)
\
    at de.cau.cs.kieler.klighd.ViewContext.update(ViewContext.java:389)
\
    at de.cau.cs.kieler.klighd.ViewContext.update(ViewContext.java:346)
\
    at de.cau.cs.kieler.klighd.lsp.KGraphDiagramUpdater.lambda$6(KGraphDiagramUpdater.java:267)
\
    at de.cau.cs.kieler.klighd.lsp.launch.AbstractLanguageServer.lambda$1(AbstractLanguageServer.java:117)
\
    at de.cau.cs.kieler.klighd.lsp.launch.AbstractLanguageServer.configureAndRun(AbstractLanguageServer.java:96)
\
    at org.lflang.diagram.lsp.LanguageDiagramServer.start(LanguageDiagramServer.java:111)
\
    at org.lflang.diagram.lsp.LanguageDiagramServer.main(LanguageDiagramServer.java:107)

Per a request from @a-sr, copying this issue here from original issue: kieler/klighd-vscode#166 (comment)

@lhstrh
Copy link
Member

lhstrh commented Jan 26, 2024

I suppose \\\c:\Users\xxxxxxxx\Development\lingua-franca\test\C\src\Deadline.lf isn't a valid path on Windows. What is the correct path?

@jjrev
Copy link
Author

jjrev commented Jan 26, 2024

Correct. Just pasting that path into Explorer doesn't work. You have to drop the first three backslashes.

Side note, I downloaded the Epoch IDE (on the same machine) and diagrams render correctly.

@jjrev
Copy link
Author

jjrev commented Jan 26, 2024

Unsure if this is related but I'm also seeing the following error on any *.lf file at the first line (regardless of what that line is):

Error executing EValidator(org.eclipse.emf.ecore.impl.EClassImpl@238915d2 (name: Model) (instanceClassName: null) (abstract: false, interface: false).0)

@lhstrh lhstrh added help wanted Extra attention is needed windows Related to the Microsoft Windows platform labels Jan 30, 2024
@lhstrh
Copy link
Member

lhstrh commented Jan 30, 2024

Seems like a trivial bug, but this would require help from a developer who runs on Windows. I flagged it as such.

@lhstrh lhstrh added the bug Something isn't working label Jan 30, 2024
@lhstrh lhstrh added this to the 0.7.0 milestone Jan 30, 2024
@jjrev
Copy link
Author

jjrev commented Jan 30, 2024

Another interesting detail is that this issue does not manifest if I use WSL to launch VSCode.

@lhstrh
Copy link
Member

lhstrh commented Jan 30, 2024

Another interesting detail is that this issue does not manifest if I use WSL to launch VSCode.

That makes sense though, because in a WSL environment straightforward Linux paths are used. What is the correct version of \\\c:\Users\xxxxxxxx\Development\lingua-franca\test\C\src\Deadline.lf?

@jjrev
Copy link
Author

jjrev commented Jan 30, 2024

I gave up trying to get the /mnt/c/Users/... path to load in VSCode launched from WSL (due to permission issues) and just cloned the repo to my WSL home directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed windows Related to the Microsoft Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants