Skip to content

fix: remove lost eprintln#110

Merged
KnorpelSenf merged 2 commits intorust-or:mainfrom
willbush:remove-println
Oct 29, 2025
Merged

fix: remove lost eprintln#110
KnorpelSenf merged 2 commits intorust-or:mainfrom
willbush:remove-println

Conversation

@willbush
Copy link
Contributor

@willbush willbush commented Oct 6, 2025

In how I'm using this crate not getting a solution to the constraints is a common thing and this eprintln is showing up in console output in context where no one would know where it came from. Seems like this can just be removed? Not sure if you want to add tracing or log crate dependency just for this.

Copy link
Contributor

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure it was just forgotten, but let's wait for @lovasoa to confirm

Copy link
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@KnorpelSenf
Copy link
Contributor

I guess we first need to fix CI, but that is unrelated to these changes.

@KnorpelSenf
Copy link
Contributor

@lovasoa do you have any idea why CI fails? It can be reproduced locally, but I honestly have no idea why the doctest fails. It works correctly for me if I do not compile the library to Wasm, and I am scared of diving into the wasm_bindgen rabbit hole just to fix this … if you can't figure it out either, I might do it anyway

@lovasoa
Copy link
Collaborator

lovasoa commented Oct 27, 2025

I had a look, I don't know where it comes from but my opinion is that the incriminated test is stupid and can be removed altogether

@KnorpelSenf
Copy link
Contributor

I love it. @willbush can you delete it yourself? We can merge right after.

@KnorpelSenf KnorpelSenf changed the title remove eprintln fix: remove lost eprintln Oct 27, 2025
@willbush
Copy link
Contributor Author

willbush commented Oct 28, 2025

I love it. @willbush can you delete it yourself? We can merge right after.

Sure. Looked into it a bit and I think it's failing because should_panic doc test expects a panic to be unwind (just guessing) panic strategy and the WASM target is probably abort or immediate-abort by default.

@willbush
Copy link
Contributor Author

willbush commented Oct 29, 2025

Actually, after looking at these docs, think we can just ignore targets that contain "wasm" and it will skip this test when running WASM test. Seems better than deleting the section on incompatible variables causing panic. Seems that's what other people are doing too https://github.com/search?q=%22%60%60%60should_panic%2Cignore-%22&type=code

`should_panic` doesn't work when running for WASM target due to its
default panic strategy.
@KnorpelSenf
Copy link
Contributor

KnorpelSenf commented Oct 29, 2025

Those were the most plot twists I've ever seen on a pull request meant to delete a lost print statement

@KnorpelSenf KnorpelSenf merged commit 8cf3cc3 into rust-or:main Oct 29, 2025
12 checks passed
@willbush willbush deleted the remove-println branch October 29, 2025 01:57
@lovasoa
Copy link
Collaborator

lovasoa commented Oct 29, 2025

Thank you both !

@willbush
Copy link
Contributor Author

Those were the most plot twists I've ever seen on a pull request meant to delete a lost print statement

I left out the best part. Someone smarter than me pointed out to me how I can formulate the problem so there's always a zero solution. So this "fix" doesn't really do anything for me afterall. 🎃🍫👻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants