Closed dimitrilw closed 1 year ago
Of note: I made zero changes to src/lib.rs
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.
Fixed
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. ❤️
I have a "new to Rust" question, if you have time to hand-hold a bit.
New error:
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?
probably because when I reverted the last two commits it downgraded the rust toolchain? https://github.com/avacore1337/OneLife/commit/565f8a31ec67f406394655e14870720ab127f02a#diff-2b1bde2cf3a858b7bf7424cb8bcbf01f35b94dc80b925d9432cbab3319ca9b4e Feel free to bump version for it. As long as it compiles, feel free to bump to whatever is the latest.
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. 🤷🏻♂️
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
.
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.
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:
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.