Skip to content

Conversation

@waywardmonkeys
Copy link
Contributor

This builds on #238 and contains the same commit.

This has a change to only run no_std checks on the libraries since examples and such aren't likely to be no_std, nor do they need to be.

@waywardmonkeys
Copy link
Contributor Author

so, --lib doesn't work here. What's the better way to deal with this?

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

I'm definitely happy to merge with a new variable added. Happy to alternatively see what Kaur thinks

save-if: ${{ github.event_name != 'merge_group' }}

# TODO: Add --target x86_64-unknown-none to the no_std check once we solve the compilation issues with it.
# https://github.com/linebender/parley/issues/86
Copy link
Member

Choose a reason for hiding this comment

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

What's the status of #86 once this PR is merged? I don't think this is currently marked as fixing that issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs to be reviewed!

# https://github.com/linebender/parley/issues/86
- name: cargo clippy (no_std)
run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} -- -D warnings
run: cargo hack clippy ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings
Copy link
Member

Choose a reason for hiding this comment

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

Hmm. I think the idiomatic approach here would be to add a new environment variable? cc @xStrom

Copy link
Member

Choose a reason for hiding this comment

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

An even better solution is a brand new cargo-hack feature --must-have-and-exclude-feature std. Unfortunately it's been stuck in review queue for a month at cargo-hack#262.

For now I think it's fine to abuse ${{ env.RUST_MIN_VER_PKGS }} and just get this landed. When the proper solution becomes possible we'll adjust it.

Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

Yes this contains a hack in the form of abusing ${{ env.RUST_MIN_VER_PKGS }}, but the new state is still much better than the old one so let's land this.

@waywardmonkeys
Copy link
Contributor Author

Until I got distracted by work, I was going to suggest that RUST_MIN_VER_PKGS could just as easily be RUST_PUBLISHED_PKGS and then the name is fine for both usages and then we could apply that across all repos.

@xStrom
Copy link
Member

xStrom commented Jan 9, 2025

One issue is that we could introduce published packages that don't support no_std. cargo-hack#262 wouldn't have any problem with that.

So my recommendation is to still just merge this as-is to get things moving, and the eventual standard change would be the more robust --must-have-and-exclude-feature std.

@waywardmonkeys waywardmonkeys added this pull request to the merge queue Jan 9, 2025
Merged via the queue into linebender:main with commit 9150f28 Jan 9, 2025
20 checks passed
@waywardmonkeys waywardmonkeys deleted the test-no_std-in-ci branch January 9, 2025 16:33
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.

3 participants