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

Added a .gitignore file for migration folder #1334

Merged
merged 5 commits into from
Mar 23, 2023
Merged

Conversation

sanihaq
Copy link
Contributor

@sanihaq sanihaq commented Dec 24, 2022

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sanihaq, thanks for contributing!! Some suggestions: #1331 (comment) :)

@sanihaq
Copy link
Contributor Author

sanihaq commented Dec 30, 2022

@billy1624 I've updated the code as you suggested.
But gotta say, defeats the whole purpose for me. Thing is, I always forget to change the root .gitignore “/target” to “/target/”. I'm a new rustacean. So, I guess just have to make a habit of doing it manually.

@tyt2y3 tyt2y3 requested a review from billy1624 January 29, 2023 04:50
@billy1624
Copy link
Member

Hey @sanihaq, I was not able to build with the git-discover dependency.

Build Log
sea-orm/sea-orm-cli on  pr/1334 [$✘!?] is 📦 v0.10.3 via 𝗥 v1.68.0 via 🅒 base
➜ cargo r
    Updating crates.io index
   Compiling sqlx-core v0.6.3
   Compiling git-ref v0.21.0
error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/store/packed/find.rs:95:52
   |
95 |                 .map(|(_rest, r)| r.name.as_bstr().as_ref())
   |                                                    ^^^^^^ the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/store/packed/find.rs:91:43
   |
91 |         a.binary_search_by_key(&full_name.as_ref(), |b: &u8| {
   |                                           ^^^^^^ the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0283]: type annotations needed
    --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/fullname.rs:109:43
     |
109  |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
     |                                           ^^^^^^^^^^^^ -------------------------- type must be known at this point
     |                                           |
     |                                           cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
     = help: the following types implement trait `core::slice::SlicePattern`:
               [T; N]
               [T]
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /Users/billy/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2317:28
     |
2317 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
109  |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
     |                                                       +++++

error[E0283]: type annotations needed
   --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/fullname.rs:109:43
    |
109 |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
    |                                           ^^^^^^^^^^^^                   ------ type must be known at this point
    |                                           |
    |                                           cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
109 |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
    |                                                       +++++

error[E0283]: type annotations needed
   --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/fullname.rs:132:46
    |
132 |         } else if let Some(shortened) = name.strip_prefix(Category::MainPseudoRef.prefix().as_ref()) {
    |                                              ^^^^^^^^^^^^                                  ------ type must be known at this point
    |                                              |
    |                                              cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
132 |         } else if let Some(shortened) = name.strip_prefix::<P>(Category::MainPseudoRef.prefix().as_ref()) {
    |                                                          +++++

error[E0283]: type annotations needed
   --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/fullname.rs:139:18
    |
139 |             name.strip_prefix(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                  ^^^^^^^^^^^^                                                        ------ type must be known at this point
    |                  |
    |                  cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
139 |             name.strip_prefix::<P>(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                              +++++

error[E0283]: type annotations needed
    --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/raw.rs:76:18
     |
76   |                 .strip_prefix(namespace.0.as_bstr().as_ref())
     |                  ^^^^^^^^^^^^ ------------------------------ type must be known at this point
     |                  |
     |                  cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
     = help: the following types implement trait `core::slice::SlicePattern`:
               [T; N]
               [T]
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /Users/billy/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2317:28
     |
2317 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
76   |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
     |                              +++++

error[E0283]: type annotations needed
  --> /Users/billy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-ref-0.21.0/src/raw.rs:76:18
   |
76 |                 .strip_prefix(namespace.0.as_bstr().as_ref())
   |                  ^^^^^^^^^^^^                       ------ type must be known at this point
   |                  |
   |                  cannot infer type of the type parameter `P` declared on the associated function `strip_prefix`
   |
   = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
           - impl AsRef<BStr> for BStr;
           - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
   |
76 |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
   |                              +++++

Some errors have detailed explanations: E0277, E0283.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `git-ref` due to 8 previous errors
warning: build failed, waiting for other jobs to finish...

@sanihaq
Copy link
Contributor Author

sanihaq commented Mar 22, 2023

@billy1624 Working fine after merging (using git2)

@billy1624 billy1624 self-assigned this Mar 22, 2023
Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! @sanihaq

@billy1624 billy1624 merged commit 3a5707b into SeaQL:master Mar 23, 2023
darkmmon added a commit to darkmmon/seaql.github.io that referenced this pull request Jul 11, 2023
billy1624 added a commit to SeaQL/seaql.github.io that referenced this pull request Jul 19, 2023
* Optional Field SeaQL/sea-orm#1513

* .gitignore SeaQL/sea-orm#1334

* migration table custom name SeaQL/sea-orm#1511

* OR condition relation SeaQL/sea-orm#1433

* DerivePartialModel SeaQL/sea-orm#1597

* space for migration file naming SeaQL/sea-orm#1570

* composite key up to 12 SeaQL/sea-orm#1508

* seaography integration SeaQL/sea-orm#1599

* QuerySelect SimpleExpr SeaQL/sea-orm#1702

* sqlErr SeaQL/sea-orm#1707

* migration check SeaQL/sea-orm#1519

* postgres array SeaQL/sea-orm#1565

* param intoString SeaQL/sea-orm#1439

* **skipped** re-export SeaQL/sea-orm#1661

* ping SeaQL/sea-orm#1627

* on empty do nothing SeaQL/sea-orm#1708

* on conflict do nothing SeaQL/sea-orm#1712

* **skipped** upgrade versions

* active enum fail safe SeaQL/sea-orm#1374

* relation generation check SeaQL/sea-orm#1435

* entity generation bug SeaQL/sea-schema#105

* **skipped** bug fix that does not require edits

* EnumIter change SeaQL/sea-orm#1535

* completed and fixed a previous todo SeaQL/sea-orm#1570

* amended wordings and structures

* Edit

* Remove temp file

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

🎉 Released In 0.12.1 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

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 this pull request may close these issues.

Add a .gitignore in migration folder for sea-orm-cli migrate init
2 participants