Skip to content

stty: refine target configuration - #15360

Draft
xtqqczze wants to merge 1 commit into
uutils:mainfrom
xtqqczze:build/stty-targets
Draft

xtqqczze wants to merge 1 commit into
uutils:mainfrom
xtqqczze:build/stty-targets

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Refine the stty target configuration to explicitly exclude unsupported platforms, skipping compilation where it would otherwise fail.

Relates to: #14912.

Comment thread src/uu/stty/Cargo.toml
doctest = false

[target.'cfg(unix)'.dependencies]
[target.'cfg(all(unix, not(any(target_os = "aix", target_os = "dragonfly"))))'.dependencies]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing clap means we cannot build anyway. Is this worth to increase complexity?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

seems less complex to be explicit about configuration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why? not(unix) is much simpler and we cannot support aix in any cases.

@xtqqczze xtqqczze Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Missing clap means we cannot build anyway

what do you mean by this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All of our utility depends on clap. So there is no reason to cfg out it.

@oech3 oech3 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should build uucore only manually. No? But I don't think that it is useful for someone.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

To add check-only CI for less common targets, it would be helpful if commands like the following could succeed:

RUSTC_BOOTSTRAP=1 cargo hack clippy -Zbuild-std \
  --quiet --workspace --all-features \
  --target=powerpc64-ibm-aix

@oech3 oech3 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But build-std is high cost to run on the all CI. Is threre any pre-built std we can use?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's just an example, -Zbuild-std wouldn't be necessary for most targets.

@oech3 oech3 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you just want to avoid fetching unnecessary crates? Then, this change is making a sense.

This branch has not been deployed

No deployments
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.

2 participants