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

Add package.json with aasvg #142

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

thgoebel
Copy link
Contributor

As suggested in martinthomson/i-d-template#385 (comment), there should be a package.json. Then running make will automatically install aasvg (assuming that npm is installed, which I am documenting in martinthomson/i-d-template#419).

Without this (and without aasvg installed otherwise), running make will throw an error:

/usr/lib/ruby/3.1.0/open3.rb:222:in `spawn': No such file or directory - aasvg (Errno::ENOENT)
        from /usr/lib/ruby/3.1.0/open3.rb:222:in `popen_run'
        from /usr/lib/ruby/3.1.0/open3.rb:103:in `popen3'
        from /usr/lib/ruby/3.1.0/open3.rb:290:in `capture3'
        from /draft-ietf-scitt-architecture/lib/.gems/ruby/3.1.0/gems/kramdown-rfc2629-1.7.4/lib/kramdown-rfc2629.rb:557:in `svg_tool_process'
        from /draft-ietf-scitt-architecture/lib/.gems/ruby/3.1.0/gems/kramdown-rfc2629-1.7.4/lib/kramdown-rfc2629.rb:506:in `call'
[...]

@aj-stein-nist
Copy link
Collaborator

aj-stein-nist commented Dec 24, 2023

Thanks for the contribution. I actually completed the supporting work, with package.json and other requirements, and it works partly. The SVG can be output by the CLI but Mermaid itself makes not-so-standard SVG files and fails tests later in the pipeline. That's why I voluntarily closed #134. More details there.

In the coming weeks I am more than happy to work with you on determining how hard it is to make upstream fixes to Mermaid but it won't be trivial.

EDIT: People wisely told me I am being silly and this is a very different issue and I conflated two. That's very correct! Easy to test and review PR, apologies, @thgoebel.

@OR13
Copy link
Collaborator

OR13 commented Jan 2, 2024

I cloned fresh, and ran make, and I see several errors on the main branch... including this one.

cat draft-ietf-scitt-architecture.md  | kramdown-rfc --v3 | lib/trace.sh draft-ietf-scitt-architecture.xml -s venue /.../draft-ietf-scitt-architecture/lib/.venv/bin/python lib/add-note.py | lib/trace.sh draft-ietf-scitt-architecture.xml -s v2v3 /.../draft-ietf-scitt-architecture/lib/.venv/bin/xml2rfc -q --rfc-base-url https://www.rfc-editor.org/rfc/ --id-base-url https://datatracker.ietf.org/doc/html/ --cache=/.../.cache/xml2rfc --v2v3 /dev/stdin -o /dev/stdout >draft-ietf-scitt-architecture.xml
---
- No link definition for link ID '@rfc2046' found on line 1098
- No link definition for link ID '@iana.mediatypes' found on line 1099
- No link definition for link ID '@rfc6838' found on line 1100
- No link definition for link ID '[ this specification ]' found on line 1109
- No link definition for link ID ' this specification ' found on line 1109
- No link definition for link ID '[ this specification ]' found on line 1111
- No link definition for link ID ' this specification ' found on line 1111
/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/open3.rb:222:in `spawn': No such file or directory - aasvg (Errno::ENOENT)
	from /opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/open3.rb:222:in `popen_run'
	from /opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/open3.rb:103:in `popen3'
	from /opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/open3.rb:290:in `capture3'

This PR should be merged, and the other errors should be addressed before other PRs are accepted.

@aj-stein-nist
Copy link
Collaborator

Yeah I am confused as when working on previous PRs, I only knew things were not working because I got errors from SVGs rendered from aasvg but I am confused what the deal was, but I must not have been paying too close attention. Thanks, @OR13.

package.json Show resolved Hide resolved
@SteveLasker
Copy link
Collaborator

The majority of other drafts I viewed didn't include package.json, which does require additional setup for the user.
This is an annoyance, and with Martin's comment, anything that can make the creation and testing of the specs prior to making a PR, the better.

Copy link
Collaborator

@SteveLasker SteveLasker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SteveLasker SteveLasker merged commit 1fa26e5 into ietf-wg-scitt:main Jan 3, 2024
1 check passed
@thgoebel thgoebel deleted the package-json branch January 3, 2024 16:55
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

Successfully merging this pull request may close these issues.

4 participants