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

Doesn't work with current erd version #14

Closed
8 opened this issue Jul 20, 2018 · 2 comments
Closed

Doesn't work with current erd version #14

8 opened this issue Jul 20, 2018 · 2 comments

Comments

@8
Copy link

8 commented Jul 20, 2018

The Problem

Hi,
The extension didn't work for me, I always got:

Syntax Error:

I've checked out your code and debugged it and it seems that calling erd without parameters is the problem because it doesn't produce .dot output as expected:

cat db.er | erd
erd: Error running utility program: Error messages from dot:
Format: "pdf" not recognized. Use one of: bmp canon cmap cmapx cmapx_np dot dot_json emf emfplus eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg json json0 metafile mp pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp xdot xdot1.2 xdot1.4 xdot_json

but specifying the output format works:

 cat db.er | erd -f dot
graph {
        graph [rankdir=LR];
        node [label="\N",
                shape=plaintext
        ];
        edge [color=gray50,
                minlen=2,
                style=dashed
        ];
        Person  [label=<<FONT FACE="Helvetica"><TABLE BORDER="0" CELLBORDER="1" CELLPADDING="4" CELLSPACING="0"><TR><TD><B><FONT POINT-SIZE="16">Person</FONT></B></TD></TR></TABLE></FONT>>];
}

The Fix

So I've updated Line 127 in extension.ts from:

            const erdProcess = child_process.spawn(erdProgram);
            const erdProcess = child_process.spawn(erdProgram, ["-f", "dot"]);

and the extension works as expected.

Additional Info

I've got the current version of erd installed (erd-0.1.3.0) by executing:

cabal install erd --allow-newer

Take care,
Martin

kaishuu0123 added a commit that referenced this issue Jul 21, 2018
fix #14. specify format option (BREAK backward compatibility erd-go from v1.4)
@kaishuu0123
Copy link
Owner

@8
Thank you for your reporting!

I fixed by #15.
version 3.1.0 released.

please try it.

Thank you

@8
Copy link
Author

8 commented Jul 22, 2018

Perfect! You fixed it! :D

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