intel / tinycbor

Concise Binary Object Representation (CBOR) Library
MIT License
489 stars 187 forks source link

240-CborKnownTagGenerator #241

Open mofosyne opened 11 months ago

mofosyne commented 11 months ago

Attempted to see how adapting it to tinycbor goes https://github.com/intel/tinycbor/issues/240

I thought about matching style and the feature flag, however on further thoughts, I'm not convinced that feature flag macro is a good idea... but added it in as a tiny cbor specific flag. Also I rather screaming snake case to make it clear it's a special value.

Anyway this script is similar to https://github.com/mofosyne/iana-headers but tiny_cbor_style_override is set to true and iana_cbor_c_header_file_path and iana_cache_dir_path was adjusted.

To run this generator use ./tools/iana/iana-cbor-c-header.py from root folder

mofosyne commented 11 months ago

At this stage the CI/CD for https://ci.appveyor.com/project/thiagomacieira/tinycbor-4yf5a/builds/48167038/job/hctm8ypght3sgv9n for Visual Studio 2019 is complaining about missing qmake.

...
src\cborencoder_close_container_checked.obj src\cborencoder_float.obj src\cborparser.obj src\cborparser_dup_string.obj src\cborparser_float.obj src\cborpretty.obj src\cborpretty_stdio.obj src\cborvalidation.obj
cd tests
qmake CONFIG-=release CONFIG+=debug
'qmake' is not recognized as an internal or external command,
operable program or batch file.
Command exited with code 1

Can't identify anything obvious about why this last check is failing.

mofosyne commented 11 months ago

Ah I see it looks like the main branch is also broken in the same spot https://ci.appveyor.com/project/thiagomacieira/tinycbor-4yf5a/builds/47789298/job/isyt34qnaj8wprkx . I think mine is ready to merge then.

mofosyne commented 11 months ago

Made further changes to improve modularity of this script, but notice that this repo is not very active... will work on it more if any maintainer response. In the meantime follow the work at https://github.com/mofosyne/iana-headers

thiagomacieira commented 11 months ago

Made further changes to improve modularity of this script, but notice that this repo is not very active... will work on it more if any maintainer response. In the meantime follow the work at https://github.com/mofosyne/iana-headers

Maintainer is here and reading. Delays are caused by lack of time, though. I try to give feedback within the week whenever possible; feel free to write "ping" if you've been waiting too long.

mofosyne commented 11 months ago

Not a problem. Thanks for letting me know you are still actively checking.

I've pushed an update. This time I'm keeping both the new enum as well as the old enum for backwards compactibility.

  /* 0-23 : Standards Action */
  // Standard date/time string; see Section 3.4.1; Ref: [RFC8949]
  CborStdDateTimeStringTag = 0,
  CborDateTimeStringTag = 0 /* depreciated but identifier kept for backwards compatibility */,
  // Epoch-based date/time; see Section 3.4.2; Ref: [RFC8949]
  CborEpochBasedDateTimeTag = 1,
  CborUnixTime_tTag = 1 /* depreciated but identifier kept for backwards compatibility */,
mofosyne commented 10 months ago

FYI there I think there is an issue with .appveyor.yml not finding qmake in 2019 at this command...

    qmake CONFIG-=release CONFIG+=debug

Studying the error log at least I can see that 'Visual Studio 2019 Developer Command Prompt v16.11.29' is being detected correctly via this line and hence set path=%PATH%;%QTDIR%\bin should be correctly set.

https://github.com/intel/tinycbor/blob/main/.appveyor.yml#L20

But i guess I should ask... is that the case?