OpenCyphal / nunaweb

A web UI for transcompiling DSDL via Nunavut.
https://nunaweb.opencyphal.org/
MIT License
4 stars 1 forks source link

Generation failed. replace() argument 1 must be str, not PosixPath #25

Closed pavel-kirienko closed 3 years ago

pavel-kirienko commented 3 years ago

If you generate code for https://github.com/Zubax/zubax_dsdl by pasting the URL into the form, you get this:

image
bbworld1 commented 3 years ago

Sorry I didn't catch this earlier, it was a simple formatting type error.

What's interesting is after fixing the bug, there was still an issue, but it appears to be with the repo itself. PyDSDL complains about zubax_internet conflicting with zubax because they both start with zubax: https://github.com/UAVCAN/pydsdl/blob/cee519f73effbec45570cd4bce50d4625b9ac7c2/pydsdl/_namespace.py#L404

The issue is fixed in PR #28 .

pavel-kirienko commented 3 years ago

I don't think the zubax_dsdl repo is at fault, otherwise this wouldn't pass: https://github.com/Zubax/zubax_dsdl/blob/7f9ccf19409354cc88c1c5b03d65db874fd2051d/.travis.yml#L10

bbworld1 commented 3 years ago

I think this has to do with how nunaweb handles linking namespaces against each other. Because nunaweb links all namespaces found against each other, it tries to link zubax_internet as a lookup namespace to zubax, which causes the error. The reason the error isn't thrown by the CI check linked is because it compiles the workspaces separately.

I think this issue would be difficult to solve without fundamentally changing how nunaweb handles linking lookup namespaces. The question is whether this is intended behavior or not; if it's not, do you have any proposals on how to resolve this?

pavel-kirienko commented 3 years ago

Sorry, it was a bug in PyDSDL. Fixed in v1.12.1; please, bump the dependency version.