pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

ENH: check maximum record length when generating db #244

Closed klauer closed 3 years ago

klauer commented 3 years ago

Closes #221

Looks like:

$ pytmc db arb.tmc
ERROR:pytmc.bin.db:Linter errors - failed to create database. To create the database ignoring these errors, use the flag `--allow-errors`
Traceback (most recent call last):
  File "/Users/klauer/docs/Repos/pytmc/pytmc/bin/db.py", line 293, in main
    debug=debug,
  File "/Users/klauer/docs/Repos/pytmc/pytmc/bin/db.py", line 155, in process
    raise ex
pytmc.bin.db.LinterError: Records exceeding the maximum length of 60 were found:
    $(PREFIX)FFO:01:FF:001:Info:PathOFDIJOIWEJFOIJWEFOIJWEOFIJWEOIFJWEOIFJ_RBV
    $(PREFIX)FFO:01:FF:002:Info:PathOFDIJOIWEJFOIJWEFOIJWEOFIJWEOIFJWEOIFJ_RBV
klauer commented 3 years ago

Interactive testing worked, local tests passed, and PR approved - merging.

Edit: and based on how painful this was for users, should've prioritized this ages ago!