• Ephera@lemmy.mlOP
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 days ago

    Just upgraded ten or so smaller projects with no compile errors whatsoever. And then one larger project (probably 20k lines of code or so), which just had a few calls to env::set_var() that needed to be wrapped in unsafe, as well as some uses of ref in pattern-matching, which were apparently not needed, so I’m actually glad to be rid of those.

    Very happy with that overall. I was already worried, they might introduce too many breaking changes with how long they were working on this edition, but those worries just evaporated.

      • Ephera@lemmy.mlOP
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        Ah, I was just wondering, if I should be upgrading all my libraries. It’s not like many users would be impacted, but still good to be aware of.

        • RustyNova@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          In general, apps/bins should strive for the latest msrv and lastest dependencies

          Libraries should do the reverse and try for the lowest msrv and dependencies version (That actually work! Don’t put version = "1" when you need 1.4.2!)

    • BB_C
      link
      fedilink
      arrow-up
      3
      ·
      2 days ago

      Just upgraded

      Weird wording!
      Maybe it’s just me, but this may give the impression that it’s something that is strictly needed, or will provide any immediate improvement, which is not the case, unless you’re still actively working on these projects and plan to use/depend on features/behaviors required by the new edition.

      • thingsiplay@beehaw.org
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        That’s the case with every software updates. Upgrading just means that you jumped to the newer version. Like upgrading to the newest Firefox won’t give everyone the same benefit instantly, but its an upgrade in version nonetheless (as an analogy to Rust version).

        • BB_C
          link
          fedilink
          arrow-up
          1
          ·
          15 hours ago

          That’s exactly the communicated meaning I was concerned an oblivious reader might get. You can use an updated Rust compiler 10 years in the future while your crate is still on 2015/2018/2021 edition. Editions are NOT software versions.

          • thingsiplay@beehaw.org
            link
            fedilink
            arrow-up
            2
            ·
            8 hours ago

            I think you misunderstand the point here. The upgrade in this case means a plus in version number, that’s what is said here. I was not implying that older versions of Rust Editions get obsolete.

      • Ephera@lemmy.mlOP
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        Yeah, fair enough. I was mainly curious, how much would break, as in how quickly I might expect the Rust ecosystem to adopt these new features. Well, and unless there’s a reason against it, I’d prefer having everything on the same edition, i.e. the newest edition.

        • BB_C
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          I might expect the Rust ecosystem to adopt these new features.

          This again points to you maybe not understanding how editions work, or maybe I’m just reading it wrong again. But you “upgrading” has no effect on your dependencies, and vise versa (except indirectly if MSRV is a factor as another user mentioned).

          • Ephera@lemmy.mlOP
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            I’m just talking about things like async closures looking like they might be really useful in a frontend framework we use. And I’m wondering when that framework’s documentation will recommend their usage. Or if there’s fancy things they can do with the AsyncFn traits.

            I will have to try out, if I can just pass an async closure without that framework changing anything. That’s the kind of thing where I am still unclear, how it will affect things. But the basic premise of editions isn’t lost on me, and this isn’t my first edition switchover either.