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

Fix release builds #54

Open
RemiBardon opened this issue Aug 6, 2024 · 0 comments
Open

Fix release builds #54

RemiBardon opened this issue Aug 6, 2024 · 0 comments
Assignees
Labels
fix Fixes a bug

Comments

@RemiBardon
Copy link
Member

Release builds have been broken for a long time, I should fix it one day…

It's caused by the fact that we use #[cfg(debug_assertions)] for a parameter in the invite_member route, and Rocket's #[post(…)] macro doesn't expect it. I was hoping it would be found and fixed by the Rocket team, but seems like they never noticed it.

One day I should take some time to create a minimal reproducible example for them or just remove #[cfg(debug_assertions)] as a temporary workaround.

   Compiling prose-pod-api v0.2.0 (/project)
error[E0061]: this function takes 7 arguments but 8 arguments were supplied
  --> src/v1/invitations/routes.rs:60:21
   |
60 | pub(super) async fn invite_member<'r>(
   |                     ^^^^^^^^^^^^^
...
68 |     #[cfg(debug_assertions)] invitation_service: LazyGuard<UnauthenticatedInvitationService<'r>>,
   |                              ------------------ unexpected argument of type `LazyGuard<unauthenticated_invitation_service::UnauthenticatedInvitationService<'_>>`
   |
note: function defined here
  --> src/v1/invitations/routes.rs:60:21
   |
60 | pub(super) async fn invite_member<'r>(
   |                     ^^^^^^^^^^^^^
61 |     conn: Connection<'r, Db>,
   |     ------------------------
62 |     app_config: &State<AppConfig>,
   |     -----------------------------
63 |     server_config: LazyGuard<ServerConfig>,
   |     --------------------------------------
64 |     jid: LazyGuard<BareJid>,
   |     -----------------------
65 |     notifier: LazyGuard<Notifier<'r>>,
   |     ---------------------------------
66 |     invitation_controller: LazyGuard<InvitationController<'r>>,
   |     ----------------------------------------------------------
67 |     req: Json<InviteMemberRequest>,
   |     ------------------------------

For more information about this error, try `rustc --explain E0061`.
error: could not compile `prose-pod-api` (lib) due to 1 previous error
@RemiBardon RemiBardon added the fix Fixes a bug label Aug 6, 2024
@RemiBardon RemiBardon self-assigned this Aug 6, 2024
@github-project-automation github-project-automation bot moved this to Backlog & Ideas 💡 in Prose Pod API to-do list Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixes a bug
Projects
Status: Backlog & Ideas 💡
Development

No branches or pull requests

1 participant