Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint errors with Rust 1.75 / 1.76 #756

Closed
edmorley opened this issue Jan 2, 2024 · 0 comments · Fixed by #757
Closed

Lint errors with Rust 1.75 / 1.76 #756

edmorley opened this issue Jan 2, 2024 · 0 comments · Fixed by #757
Assignees

Comments

@edmorley
Copy link
Member

edmorley commented Jan 2, 2024

The lint CI job on main is failing after the Rust 1.75 release, with:

warning: all fields have the same postfix: `name`
   --> libcnb-test/src/test_runner.rs:179:1
    |
179 | / pub(crate) struct TemporaryDockerResources {
180 | |     pub(crate) build_cache_volume_name: String,
181 | |     pub(crate) image_name: String,
182 | |     pub(crate) launch_cache_volume_name: String,
183 | | }
    | |_^
    |
    = help: remove the postfixes
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
    = note: `-W clippy::struct-field-names` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_field_names)]`

In addition, locally using Rust 1.76 beta I get:

warning: items after a test module
   --> libcnb/src/layer_env.rs:598:1
    |
598 | mod tests {
    | ^^^^^^^^^
...
930 | const PATH_LIST_SEPARATOR: &str = ":";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module
    = note: `#[warn(clippy::items_after_test_module)]` on by default
    = help: move the items to before the test module was defined

GUS-W-14739086.

@edmorley edmorley self-assigned this Jan 2, 2024
edmorley added a commit that referenced this issue Jan 3, 2024
Fixes the following CI failures on `main`:
1. Lint failures on the newly released Rust 1.75 (see #756)
    (plus pre-emptively fixes another for Rust 1.76 beta).
2. Integration test failures due to the Ruby example having
    picked up newer bundler, which is not compatible with
    the Ruby 2.7 it uses.

I've opted to delete the Ruby example entirely, since:
1. This is currently blocking libcnb.rs PRs/development.
2. It has multiple issues that really require a complete rewrite:
  - #398
  - #479
  - #746
  - #755
3. IMO including a full language CNB example in this repo is
  not something we should do, since it's both never going to
  fully support the language in a best practice way, and also
  will be too complicated to demonstrate libcnb concepts in
  the simplified way that we should be using in an example.
  Instead, we should stick to simple examples of concepts,
  and then link out to our real-world CNB repos for users
  who want to do further reading.

As an added bonus, the removal will speed up CI a fair amount, since
the Ruby integration test was very slow (due to it bundler plus the test
using a different builder image, so another docker pull).

Fixes #756.
Fixes #755.
Closes #398.
Closes #479.
Closes #746.
GUS-W-14739082.
GUS-W-14739086.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant