Error "no method named set found" When Compiling diesel_migrations During Build #2890

Closed
opened 2026-04-06 04:16:34 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @nezartarbin on 7/10/2020

Subject of the issue

I pulled the latest from master and attempted to build by running:
cargo build --features postgresql --release

But I ran into this error around the end. I was able to resolve the issue by checking out v1.15.x and building that instead, but thought I would report the issue just in case.

Your environment

  • Bitwarden_rs version: latest in master
  • Install method: build from source
  • Clients used:
  • Reverse proxy and version:
  • Version of mysql/postgresql:
  • Other relevant information:

Steps to reproduce

clone the latest from master, run cargo clean && cargo build --features postgresql --release

Expected behaviour

Should build correctly

Actual behaviour

It did not build and instead produced the error logs below

Relevant logs

Compiling migrations_internals v1.4.1
   Compiling migrations_macros v1.4.2
   Compiling diesel_migrations v1.4.0
   Compiling rocket_contrib v0.5.0-dev (https://github.com/SergioBenitez/Rocket?rev=1010f6a2a88fac899dec0cd2f642156908038a53#1010f6a2)
error[E0599]: no method named `set` found for struct `diesel::query_builder::InsertStatement<db::schema::users_collections::table, diesel::pg::upsert::on_conflict_clause::OnConflictValues<diesel::query_builder::ValuesClause<(diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::user_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::collection_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::hide_passwords, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>), db::schema::users_collections::table>, diesel::pg::upsert::on_conflict_target::ConflictTarget<(db::schema::users_collections::columns::user_uuid, db::schema::users_collections::columns::collection_uuid)>, diesel::pg::upsert::on_conflict_actions::DoUpdate<diesel::query_builder::update_statement::changeset::Assign<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>>>` in the current scope
   --> src/db/models/collection.rs:231:14
    |
231 |             .set(users_collections::hide_passwords.eq(hide_passwords))
    |              ^^^ method not found in `diesel::query_builder::InsertStatement<db::schema::users_collections::table, diesel::pg::upsert::on_conflict_clause::OnConflictValues<diesel::query_builder::ValuesClause<(diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::user_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::collection_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::hide_passwords, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>), db::schema::users_collections::table>, diesel::pg::upsert::on_conflict_target::ConflictTarget<(db::schema::users_collections::columns::user_uuid, db::schema::users_collections::columns::collection_uuid)>, diesel::pg::upsert::on_conflict_actions::DoUpdate<diesel::query_builder::update_statement::changeset::Assign<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>>>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `bitwarden_rs`.

To learn more, run the command again with --verbose.
*Originally created by @nezartarbin on 7/10/2020* <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unneccessary for your issue, feel free to remove them. Remember to hide/obfuscate personal and confidential information, such as names, global IP/DNS adresses and especially passwords, if neccessary. --> ### Subject of the issue <!-- Describe your issue here.--> I pulled the latest from master and attempted to build by running: `cargo build --features postgresql --release` But I ran into this error around the end. I was able to resolve the issue by checking out v1.15.x and building that instead, but thought I would report the issue just in case. ### Your environment <!-- The version number, obtained from the logs or the admin page --> * Bitwarden_rs version: latest in master <!-- How the server was installed: Docker image / package / built from source --> * Install method: build from source * Clients used: <!-- if applicable --> * Reverse proxy and version: <!-- if applicable --> * Version of mysql/postgresql: <!-- if applicable --> * Other relevant information: ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start bitwarden_rs? --> clone the latest from master, run `cargo clean && cargo build --features postgresql --release` ### Expected behaviour <!-- Tell us what should happen --> Should build correctly ### Actual behaviour <!-- Tell us what happens instead --> It did not build and instead produced the error logs below ### Relevant logs <!-- Share some logfiles, screenshots or output of relevant programs with us. --> ``` Compiling migrations_internals v1.4.1 Compiling migrations_macros v1.4.2 Compiling diesel_migrations v1.4.0 Compiling rocket_contrib v0.5.0-dev (https://github.com/SergioBenitez/Rocket?rev=1010f6a2a88fac899dec0cd2f642156908038a53#1010f6a2) error[E0599]: no method named `set` found for struct `diesel::query_builder::InsertStatement<db::schema::users_collections::table, diesel::pg::upsert::on_conflict_clause::OnConflictValues<diesel::query_builder::ValuesClause<(diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::user_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::collection_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::hide_passwords, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>), db::schema::users_collections::table>, diesel::pg::upsert::on_conflict_target::ConflictTarget<(db::schema::users_collections::columns::user_uuid, db::schema::users_collections::columns::collection_uuid)>, diesel::pg::upsert::on_conflict_actions::DoUpdate<diesel::query_builder::update_statement::changeset::Assign<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>>>` in the current scope --> src/db/models/collection.rs:231:14 | 231 | .set(users_collections::hide_passwords.eq(hide_passwords)) | ^^^ method not found in `diesel::query_builder::InsertStatement<db::schema::users_collections::table, diesel::pg::upsert::on_conflict_clause::OnConflictValues<diesel::query_builder::ValuesClause<(diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::user_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::collection_uuid, diesel::expression::bound::Bound<diesel::sql_types::Text, &str>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>, diesel::insertable::ColumnInsertValue<db::schema::users_collections::columns::hide_passwords, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>), db::schema::users_collections::table>, diesel::pg::upsert::on_conflict_target::ConflictTarget<(db::schema::users_collections::columns::user_uuid, db::schema::users_collections::columns::collection_uuid)>, diesel::pg::upsert::on_conflict_actions::DoUpdate<diesel::query_builder::update_statement::changeset::Assign<db::schema::users_collections::columns::read_only, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>>>` error: aborting due to previous error For more information about this error, try `rustc --explain E0599`. error: could not compile `bitwarden_rs`. To learn more, run the command again with --verbose. ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#2890