OpenCyphal / yakut

Simple CLI tool for diagnostics and debugging of Cyphal networks
https://opencyphal.org
MIT License
49 stars 10 forks source link

Yakut paths are inscrutable and we don't help the user #100

Closed thirtytwobits closed 7 months ago

thirtytwobits commented 7 months ago

given:

~/.dsdl/uavcan

user does:

> yakut --path ~/.dsdl -i "UDP('172.16.0.44', None)" -v pub -T 0.01 1234:uavcan.si.unit.length.scalar '!$ "sin(t * pi * 2) * 10"'
Error: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'
> yakut compile ~/.dsdl
> yakut --path ~/.dsdl -i "UDP('172.16.0.44', None)" -v pub -T 0.01 1234:uavcan.si.unit.length.scalar '!$ "sin(t * pi * 2) * 10"'
Error: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'
> yakut compile ~/.dsdl/uavcan
> yakut --path ~/.dsdl -i "UDP('172.16.0.44', None)" -v pub -T 0.01 1234:uavcan.si.unit.length.scalar '!$ "sin(t * pi * 2) * 10"'
Error: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'
> yakut --path ~/.dsdl/uavcan -i "UDP('172.16.0.44', None)" -v pub -T 0.01 1234:uavcan.si.unit.length.scalar '!$ "sin(t * pi * 2) * 10"'
Error: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'
> yakut --path ~/.dsdl/uavcan/si/unit/length/scalar -i "UDP('172.16.0.44', None)" -v pub -T 0.01 1234:uavcan.si.unit.length.scalar '!$ "sin(t * pi * 2) * 10"'
Error: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'
> yakut compile ~/.dsdl/uavcan/*
UndefinedDataTypeError: /Users/person/.dsdl/uavcan/diagnostic/8184.Record.1.1.dsdl:4: Data type uavcan.time.SynchronizedTimestamp.1.0 could not be found in the following root namespaces: {'protocol', 'time', 'metatransport', 'primitive', 'diagnostic', 'register', 'file', 'pnp', 'node', 'si', 'internet'}.  Please make sure that you specified the directories correctly.
> yakut compile -v ~/.dsdl/uavcan/*
Usage: yakut compile [OPTIONS] SOURCE...
Try 'yakut compile --help' for help.

Error: No such option: -v
> yakut compile ~/.dsdl/*
UnregulatedFixedPortIDError: /Users/person/.dsdl/vsdk/message/adn/communicationsystem/209.LargeFileWrite.0.1.dsdl: Regulated port ID 209 for service type 'vsdk.message.adn.communicationsystem.LargeFileWrite' is not valid. Consider using allow_unregulated_fixed_port_id.
> export YAKUT_PATH=~/.dsdl
> yakut compile
Usage: yakut compile [OPTIONS] SOURCE...
Try 'yakut compile --help' for help.

Error: Missing argument 'SOURCE...'.
> yakut compile fuck/you/yakut
FileNotFoundError: [Errno 2] No such file or directory: '/Users/dixonsco/workspace/TestWorkspace2/src/AdnDroneCommunicationBrazil/fuck/you/yakut'
pavel-kirienko commented 7 months ago

This is covered by https://github.com/OpenCyphal/yakut/issues/63, closing as duplicate.