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

[Bug]: Cannot build 0.19.9 Lemmy server release, fails on compiling lemmy_api_common v0.19.9 #5432

Closed
5 tasks done
Alinus63 opened this issue Feb 15, 2025 · 5 comments
Closed
5 tasks done
Labels
bug Something isn't working

Comments

@Alinus63
Copy link

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Do you agree to follow the rules in our Code of Conduct?
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

On updating lemmy-server from 0.19.8 to 0.19.9, compilation fails on lemmy_api_common v0.19.9

Steps to Reproduce

Perform the following sequence, as per Lemmy's "install from scratch" page for updating:

  1. rustup update
  2. cd lemmy
  3. git checkout main
  4. git pull --tags
  5. git checkout 0.19.9
  6. git submodule update --recursive --remote
  7. echo "pub const VERSION: &str = "$(git describe --tag)";" > "crates/utils/src/version.rs"
  8. cargo build --release

Compilation will fail on lemmy_api_common v0.19.9

Trying with the same configuration to build on main (omitting step 5) compiles successfully on 1.0.0 alpha

Technical Details

Using:

  • Ubuntu 22.04 LTS
  • rustup 1.27.1
  • rustc 1.84.1
  • rustfmt 1.8.0-stable

Same result is observed with rustc 1.83.0, with which same sequance compiled lemmy-server 0.19.8 fine

Output at failure point is as follows:

Compiling lemmy_api_common v0.19.9 (/home/lemmy/lemmy/crates/api_common)
error[E0061]: this method takes 4 arguments but 3 arguments were supplied
--> crates/api_common/src/build_response.rs:154:17
|
154 | &lang.notification_mentioned_by_body(&content, &inbox_link, &person.name),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------------- argument #4 is missing
|
note: method defined here
--> /home/lemmy/lemmy/target/release/build/lemmy_utils-12da9b6901c0cbde/out/rosetta_output.rs:1:8859
|
1 | ...username = username) } } # [allow (clippy :: all)] pub fn notification_mentioned_by_body (& self , comment_link : impl :: std :: fmt :: Display , comment_text : impl :: std :: fmt :: Display , inbox_link : impl :: std :: fmt :: Display , username : impl :: std :: fmt :: Display) -> :: std :: string :: String { match self { _ => format ! ...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
154 | &lang.notification_mentioned_by_body(&content, &inbox_link, &person.name, /* username */),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0061]: this method takes 6 arguments but 3 arguments were supplied
--> crates/api_common/src/build_response.rs:208:21
|
208 | &lang.notification_comment_reply_body(&content, &inbox_link, &person.name),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------------- three arguments are missing
|
note: method defined here
--> /home/lemmy/lemmy/target/release/build/lemmy_utils-12da9b6901c0cbde/out/rosetta_output.rs:1:11072
|
1 | ...hostname) } } # [allow (clippy :: all)] pub fn notification_comment_reply_body (& self , comment_link : impl :: std :: fmt :: Display , comment_text : impl :: std :: fmt :: Display , inbox_link : impl :: std :: fmt :: Display , parent_comment_text : impl :: std :: fmt :: Display , post_title : impl :: std :: fmt :: Display , username : impl :: std :: fmt :: Display) -> :: std :: str...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the arguments
|
208 | &lang.notification_comment_reply_body(&content, &inbox_link, &person.name, /* parent_comment_text /, / post_title /, / username */),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0061]: this method takes 5 arguments but 3 arguments were supplied
--> crates/api_common/src/build_response.rs:254:21
|
254 | &lang.notification_post_reply_body(&content, &inbox_link, &person.name),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------------- two arguments are missing
|
note: method defined here
--> /home/lemmy/lemmy/target/release/build/lemmy_utils-12da9b6901c0cbde/out/rosetta_output.rs:1:9899
|
1 | ...rname = username) } } # [allow (clippy :: all)] pub fn notification_post_reply_body (& self , comment_link : impl :: std :: fmt :: Display , comment_text : impl :: std :: fmt :: Display , inbox_link : impl :: std :: fmt :: Display , post_title : impl :: std :: fmt :: Display , username : impl :: std :: fmt :: Display) -> :: std :: string :: String { match self { _ => format ! ("...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the arguments
|
254 | &lang.notification_post_reply_body(&content, &inbox_link, &person.name, /* post_title /, / username */),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try rustc --explain E0061.
error: could not compile lemmy_api_common (lib) due to 3 previous errors

Version

Current is BE 0.19.8, trying to upgrade to BE 0.19.9

Lemmy Instance URL

No response

@Alinus63 Alinus63 added the bug Something isn't working label Feb 15, 2025
@Nothing4You
Copy link
Collaborator

the instructions for updating the translations submodule seem to be wrong.
try running git submodule update instead of git submodule update --recursive --remote.

@meaz
Copy link

meaz commented Feb 16, 2025

I have the same issue. I update like @Alinus63 each time, and that the first time I've got this error.
@Nothing4You according to https://join-lemmy.org/docs/administration/from_scratch.html#lemmy it should be git submodule update --recursive --remote. But indeed, I've tried with git submodule update and it worked. So should it be considered as the "official" wya of updating?

@Alinus63
Copy link
Author

Thanks, that worked; I actually dropped the --remote but kept the --recursive option so step 6 of update should become:

git submodule update --recursive

And all compiles successfully and update is fine. I guess to close the issue, the official doc needs to be updated?

@dessalines
Copy link
Member

Yes they probably should, would you make a PR to https://github.com/LemmyNet/lemmy-docs ? Thx.

In the future we're going to never change existing translation strings, and only add new ones, because of the messes it causes.

@Alinus63
Copy link
Author

Done, PR opened. I guess the issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants