Skip to content

Finish disentangling Windows and Unix logic #2424

Closed

Description

@workingjubilee

After #2342 there's still a few instances of the platform-specific code being entangled between the two OS platforms.

In some cases this is because of usage of cfg!(expr) which works very differently than #[cfg(attr)]. This causes useless object code to be compiled on Windows that cannot be properly tested and evaluated and in any case probably fails to even compile due to being dependent on some hidden platform-targeted code. There might also be other increases in compilation times as a result of poor separation of logic. So, ideally, the Windows and Unix logic would be cleanly separated, or at least enough so that neither platform compiles useless, impossible to test, and possibly-erroneous codepaths on the other.

I likely will follow up on this myself but I'm filing this issue for self-reference, because several instances of editing code that was supposed to only affect Unix platforms and then mysteriously breaking Windows in CI (and not because I broke generally-applicable code) was a notable part of my experience with #2387.

### Tasks
- [ ] https://github.com/rust-lang/rustup/issues/3936#issuecomment-2222224266
- [ ] https://github.com/rust-lang/rustup/pull/3887

Activity

  1. added this to the 1.28.0 milestone on Jul 10, 2024
  2. djc commented on Jul 11, 2024

    @djc
    Contributor

    #3887 made some progress on this, too.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions