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

Version 0.41.0 doesn't compile #707

Closed
jhspetersson opened this issue Oct 2, 2024 · 3 comments · Fixed by #711
Closed

Version 0.41.0 doesn't compile #707

jhspetersson opened this issue Oct 2, 2024 · 3 comments · Fixed by #711

Comments

@jhspetersson
Copy link

 Compiling octocrab v0.41.0
error: named argument never used                                                                                                                                                                                                
  --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\octocrab-0.41.0\src\api\repos\release_assets.rs:98:20
   |
96 |             "/{}/releases/assets/{id}",
   |             -------------------------- formatting specifier missing
97 |             owner = self.parent.owner,
98 |             repo = self.parent.repo,
   |                    ^^^^^^^^^^^^^^^^ named argument never used

error[E0609]: no field `parent` on type `&ReleaseAssetsHandler<'_, '_>`                                                                                                                                                         
  --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\octocrab-0.41.0\src\api\repos\release_assets.rs:97:26
   |
97 |             owner = self.parent.owner,
   |                          ^^^^^^ unknown field
   |
   = note: available field is: `handler`

error[E0609]: no field `parent` on type `&ReleaseAssetsHandler<'_, '_>`
  --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\octocrab-0.41.0\src\api\repos\release_assets.rs:98:25
   |
98 |             repo = self.parent.repo,
   |                         ^^^^^^ unknown field
   |
   = note: available field is: `handler`

error[E0609]: no field `parent` on type `&ReleaseAssetsHandler<'_, '_>`                                                                                                                                                         
   --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\octocrab-0.41.0\src\api\repos\release_assets.rs:110:28
    |
110 |         let request = self.parent.crab.build_request(builder, None::<&()>)?;
    |                            ^^^^^^ unknown field
    |
    = note: available field is: `handler`

error[E0609]: no field `parent` on type `&ReleaseAssetsHandler<'_, '_>`
   --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\octocrab-0.41.0\src\api\repos\release_assets.rs:111:29
    |
111 |         let response = self.parent.crab.execute(request).await?;
    |                             ^^^^^^ unknown field
    |
    = note: available field is: `handler`

error[E0609]: no field `parent` on type `&ReleaseAssetsHandler<'_, '_>`
   --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\octocrab-0.41.0\src\api\repos\release_assets.rs:112:29
    |
112 |         let response = self.parent.crab.follow_location_to_data(response).await?;
    |                             ^^^^^^ unknown field
    |
    = note: available field is: `handler`

error[E0609]: no field `parent` on type `&ReleasesHandler<'_, '_>`
   --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\octocrab-0.41.0\src\api\repos\releases.rs:247:14
    |
247 |         self.parent.release_assets().stream(asset_id).await
    |              ^^^^^^ unknown field
    |
    = note: available field is: `handler`

For more information about this error, try `rustc --explain E0609`.                                                                                                                                                             
error: could not compile `octocrab` (lib) due to 7 previous errors
@benpueschel
Copy link
Contributor

Are you able to share some steps to reproduce this issue? v0.41.0 should build on all platforms and I can't reproduce this.

Your local cargo registry may have gotten confused when upgrading the crate. In that case, clean-building your project or removing octocrab's registry cache entry may help.

@jhspetersson
Copy link
Author

I have octocrab as a dependency:

octocrab = { version = "0.41.0", features = ["stream"] }

For versions 0.39.0 and 0.40.0 everything worked liked a charm. However, 0.41.0 gives me those errors on build.

Unfortunately, cleaning up the cargo cache doesn't help.

@benpueschel
Copy link
Contributor

Alright, I think I see the issue here. Seems like #690 broke the stream feature, which the tests didn't catch.
I'll see if anything else is broken and open a PR to fix this.

benpueschel added a commit to benpueschel/octocrab that referenced this issue Oct 6, 2024
Fix a build issue introduced by XAMPPRocky#690 when building octocrab with the
`stream` feature.

Closes: XAMPPRocky#707
XAMPPRocky added a commit that referenced this issue Oct 15, 2024
* fix: crate build issues with `stream` feature

Fix a build issue introduced by #690 when building octocrab with the
`stream` feature.

Closes: #707

* style: cargo fmt

* ci: add checks for `stream` feature

* docs: fix release-asset stream test

* Add LLVM for symboliser.

* Add ubuntu check

* Remove --verbose

* ci: feature matrix

* ci: add missing dollar sign

---------

Co-authored-by: XAMPPRocky <[email protected]>
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 a pull request may close this issue.

2 participants