-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stable topological sort using original order. #1247
Conversation
Libcrux CI job using this hax branch: https://github.com/cryspen/libcrux/actions/runs/12866379703/job/35868825565 |
This one failed because of a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that looks good!
I only have a few nits :)
@maximebuyse I'm adding your PR to the merge queue |
has this been tested on libcrux? |
Yes, this works with this libcrux PR: cryspen/libcrux#759 |
I was surprised that we needed cryspen/libcrux#759 in libcrux because it was caused by the first item in a file being moved lower in the file with no apparent dependency justifying the move. The reason is that we are working with the global order of items across all modules. So there can be a situation like this: Module |
I moved the sort to the backends to make it module-wise. This required a few additional changes:
I started https://github.com/cryspen/libcrux/actions/runs/12891137700/job/35942373454 to test it on libcrux (main branch as it should now work!) |
Unfortunately there are more bugs:
|
f198481
to
bc7fe65
Compare
I implemented a new version running before |
bc7fe65
to
769a793
Compare
If several Example: #[hax_lib::fstar::after("let x = ()")]
#[hax_lib::fstar::after("let y = ()")]
fn f() {} Open this code snippet in the playground The generated F* without this PR is:
With this PR:
|
I made sure that |
@karthikbhargavan @W95Psp I think we are in a state where we can merge! With the changes in cryspen/libcrux#759 (swapping some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few nits
Fixes #771
See #1151 (comment) for more context. The implementation of this PR: