Conversation
|
Things look good on the Eurydice end -- @tahina-pro please confirm this works for you in case you have other regression suites you'd like to run. Thank you! |
|
Thanks a lot Jonathan! While this PR solves the C extraction and compilation issue, it now seems to introduce a Karamel-to-Rust extraction issue where Karamel does not properly remove a record field of DetailsMeanwhile, for completeness: on https://github.com/tahina-pro/quackyducky/commits/_taramana_krml_679/ , the following command:make clean && ADMIT=1 make -j$(nproc) cbor-extract-pre && ADMIT=1 ./shell.sh -c 'make -j$(nproc) -C src/cbor/pulse/krml det-rust'to rebuild Karamel and extract Rust parsers and serializers for Deterministically Encoded CBOR, works on tahina-pro/quackyducky@c586551, which pulls the latest Karamel |
|
Ok interesting. I'll hold off on merging this until you can provide me with a repro, and then I'll make sure this PR contains both the new testcase and a fix for it. Is there some CI place I should be looking at to avoid these unpleasant regressions? Would you like to add some additional regressions in the karamel CI? If so, I'm open to it |
meh, that unit test succeeds
The test now uses three modules: Base (type definition), Derived (field access producing PRecord pattern), and Caller (API entry point calling Derived.g). The bundle 'Base+Caller=Derived[rename=Derived]' makes Base an API module whose declarations come LAST in the bundle, after Derived.g. This causes remove_unit_fields to encounter PRecord patterns before the DType definition populates the erasable_fields hashtable, triggering the 'some fields are superfluous (pat)' error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…into _taramana_679
I just pushed it here as promised. I instructed GitHub Copilot CLI 0.410.0 with Claude Opus 4.6 to minimize the CBOR Rust extraction failure that I mentioned in the details above, and it produced 4a20397, with an example, In doing so, the LLM claims the following as the root cause:
|
Thanks a lot Jonathan for suggesting! In fact, EverParse has a nightly CI workflow where it tries to upgrade F* and Pulse (and Karamel, once this PR is merged) : https://github.com/project-everest/everparse/actions/workflows/nightly.yml . There, Karamel-specific output can be seen in Actions > Upgrade hashes, 3d doc, CBOR, COSE (nightly.yml) > Advance hashes > Generate CBOR snapshot with Karamel, and Actions > ... > Generate COSE snapshot with Karamel. However, since this nightly workflow rebuilds and re-tests all of EverParse, it is very slow. Thus, it only runs twice a week, on Sundays and Wednesdays at 2pm Seattle time. Alternatively, if you want to test rebuilding of CBOR and COSE at each Karamel PR, I just opened #680 to add such rebuilds to the Karamel CI, with what I believe is enough leverage of GitHub Actions' caching mechanism to reduce the rebuilds of F* and EverParse unrelated to Karamel to a few seconds instead of a few dozen minutes. |
|
I think your comment is correct and the assumption that the definition comes before the use was never true.
How can I get emails for such build breakages?
This sounds even better. I'll take a look at that second PR once we get a green on this one. Thanks so much! |
I recommend viewing the diff with whitespace off: link
the changes are relatively minimal and consist in skipping a recursive traversal if we have no good reason to do it
this also allowed me to remove a call to self#visit_node that I always thought was un-necessary but for some reason remained... good riddance
@tahina-pro are there any additional regressions you would like to run for this?
on my end, this breaks eurydice: AeneasVerif/eurydice#378 so I need to investigate what's going on there