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

Could not compile peace_dal with ambiguous name error #6

Closed
fluffyloopy opened this issue Feb 16, 2023 · 2 comments
Closed

Could not compile peace_dal with ambiguous name error #6

fluffyloopy opened this issue Feb 16, 2023 · 2 comments

Comments

@fluffyloopy
Copy link

Compiling peace_dal v0.1.0 (/home/ubuntu/peace/frame/dal)
error[E0659]: `sea_orm` is ambiguous
 --> frame/dal/src/db/peace/migration/versions/create_seed_data.rs:1:5
  |
1 | use sea_orm::DbBackend;
  |     ^^^^^^^ ambiguous name
  |
  = note: ambiguous because of multiple potential import sources
  = note: `sea_orm` could refer to a crate passed with `--extern`
  = help: use `::sea_orm` to refer to this crate unambiguously
note: `sea_orm` could also refer to the crate imported here
 --> frame/dal/src/db/peace/migration/versions/create_seed_data.rs:2:5
  |
2 | use sea_orm_migration::prelude::*;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = help: use `self::sea_orm` to refer to this crate unambiguously

error[E0659]: `sea_orm` is ambiguous
 --> frame/dal/src/db/peace/migration/versions/init_tables.rs:1:5
  |
1 | use sea_orm::DbBackend;
  |     ^^^^^^^ ambiguous name
  |
  = note: ambiguous because of multiple potential import sources
  = note: `sea_orm` could refer to a crate passed with `--extern`
  = help: use `::sea_orm` to refer to this crate unambiguously
note: `sea_orm` could also refer to the crate imported here
 --> frame/dal/src/db/peace/migration/versions/init_tables.rs:2:5
  |
2 | use sea_orm_migration::prelude::*;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = help: use `self::sea_orm` to refer to this crate unambiguously

warning: unused `#[macro_use]` import
 --> frame/dal/src/lib.rs:1:1
  |
1 | #[macro_use]
  | ^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `sea_orm::DbBackend`
 --> frame/dal/src/db/peace/migration/versions/create_seed_data.rs:1:5
  |
1 | use sea_orm::DbBackend;
  |     ^^^^^^^^^^^^^^^^^^

error[E0119]: conflicting implementations of trait `sea_orm::TryFromU64` for type `PpVersion`
   --> frame/dal/src/db/peace/entity/sea_orm_active_enums.rs:125:1
    |
125 | impl TryFromU64 for PpVersion {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: conflicting implementation in crate `sea_orm`:
            - impl<T> sea_orm::TryFromU64 for T
              where T: sea_orm::ActiveEnum;

error[E0119]: conflicting implementations of trait `sea_orm::TryFromU64` for type `sea_orm_active_enums::RankingType`
   --> frame/dal/src/db/peace/entity/sea_orm_active_enums.rs:136:1
    |
136 | impl TryFromU64 for RankingType {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: conflicting implementation in crate `sea_orm`:
            - impl<T> sea_orm::TryFromU64 for T
              where T: sea_orm::ActiveEnum;

error[E0119]: conflicting implementations of trait `sea_orm::TryFromU64` for type `sea_orm_active_enums::ChannelHandleType`
   --> frame/dal/src/db/peace/entity/sea_orm_active_enums.rs:149:1
    |
149 | impl TryFromU64 for ChannelHandleType {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: conflicting implementation in crate `sea_orm`:
            - impl<T> sea_orm::TryFromU64 for T
              where T: sea_orm::ActiveEnum;

Some errors have detailed explanations: E0119, E0659.
For more information about an error, try `rustc --explain E0119`.
warning: `peace_dal` (lib) generated 2 warnings
error: could not compile `peace_dal` due to 5 previous errors; 2 warnings emitted
@Pure-Peace
Copy link
Owner

Pure-Peace commented Feb 19, 2023

This should not be an error. You might try to upgrade the rust version with rustup update and clean the cargo cache with cargo clean, then run cargo check

Correction: This seems to be because of the latest 0.11 release of seaorm, which needs to be fixed

Pure-Peace added a commit that referenced this issue Feb 19, 2023
Pure-Peace added a commit that referenced this issue Feb 19, 2023
@Pure-Peace
Copy link
Owner

Issue resolved, thanks for the feedback

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

No branches or pull requests

2 participants