Skip to content
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

cannot compile #4

Closed
dimitrilw opened this issue Sep 5, 2023 · 7 comments
Closed

cannot compile #4

dimitrilw opened this issue Sep 5, 2023 · 7 comments

Comments

@dimitrilw
Copy link
Contributor

When trying to run tests on a few minor changes (just text strings for typos; not a single change to real code), I got this fail:
image

Upon inspecting file src/lib.rs, I am really not sure exactly what I'm looking at. However, rust-analyzer is screaming Red Highlighter of Doom messages throughout the file. To a Rust Noob like me, it appears like there was some VIM scripting / macro'ing that went a bit haywire and got checked into the repo. Does the master branch still compile for you all? Or is this a "me problem"...?

Full disclosure, I have not yet checked out older commits to test compilation. Just firing off the question. I apologize for Noob questions right out of the gates.

@dimitrilw
Copy link
Contributor Author

Of note: I made zero changes to src/lib.rs

@avacore1337
Copy link
Owner

Yes, the last commit was a WIP thing (with me apparently messing up one of the files with a find replace I think) I pushed since I was switching computer...
I should probably just revert it.

@avacore1337
Copy link
Owner

Fixed

@dimitrilw
Copy link
Contributor Author

Unrelated side-comment: I realize you had not worked this repo for a long time. Thank you for your willingness to engage. I honestly expected radio-silence and just having to do code only in my fork. I believe this was a Wasm learning project for you; I plan to piggy-back on your experience and also use it to learn a bit of Rust Wasm. Thank you for this repo. And thank you for engaging with me. ❤️

@dimitrilw
Copy link
Contributor Author

I have a "new to Rust" question, if you have time to hand-hold a bit.

New error:
image

I assume this is a "yanked version" of the "once_cell" crate. The odd thing is that the 1.8.0 version appears to be ref'd on Crates.io: once_cell v1.8.0. I am guessing that these v1.8.0 docs are just an artifact, and the real crate is "yanked" -- does that seem right to you?

I've navigated the dicey waters of "just upgrade this one package" in many languages before (Python, C/C++, Javascript, Go, Perl, etc, etc, etc) and it is never a pleasant experience. But with your blessing, I will try to work the OneLife repo's Cargo.toml file & the versions listed until I get a "can compile it today" state. Are you ok with a Rust Noob navigating this a bit?

@avacore1337
Copy link
Owner

probably because when I reverted the last two commits it downgraded the rust toolchain?
565f8a3#diff-2b1bde2cf3a858b7bf7424cb8bcbf01f35b94dc80b925d9432cbab3319ca9b4e
Feel free to bump version for it. As long as it compiles, feel free to bump to whatever is the latest.

@dimitrilw
Copy link
Contributor Author

dimitrilw commented Sep 6, 2023

Ok, I've made a few changes. First, rust-toolchain is no longer anchored to an old nightly, but rather to "stable", which meant that I had to replace the drain_filter calls with retain and reverse the logic (add a !). Also, variant_count nightly feature was replaced with the variant_count crate and it's Derive macro instruction. I am not sure if those were the best stable solutions, but the code compiled and passed tests. 🤷🏻‍♂️
image

So I am going to make a pull-request. It is a smidge messy, as I had already made some typo fixes before trying to compile and I'd prefer to not tease those out of the commit. But I will try to make the commit message as explicit as possible to ensure clarity.

Also, with your blessing, I am going to look at updating the repo's dependencies and some code. I.e., there are many warnings, mostly about from_serde and into_serde.
image
I would like to try fixing these, too ...and then updating dependencies to current versions and dealing with whatever issues shake out of that process.

But I will track all of that in different tickets. This ticket was intended to just track "can I compile & test it?" And after the changes found in PR 6, the answer is "yes" so I think this ticket is truly closed now.

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

No branches or pull requests

2 participants