Diesel: Compatibility with use_extern_macros

Created on 8 Dec 2018  路  3Comments  路  Source: diesel-rs/diesel

Versions

  • Rust: rustc 1.32.0-nightly (14997d56a 2018-12-05) (but this issue is applicable on stable)
  • Diesel: 1.3.3
  • Database: N/A
  • Operating System: macOS 10.14.1

Feature Flags

  • ruma-identifiers: diesel

Problem Description

Attempting to update ruma-identifiers as of commit 78b0d1e to Rust 2018 and warnings related to Diesel's custom derives make me think it might not be compatible.

What is the expected output?

No warnings.

What is the actual output?

The same error for many similar types deriving FromSqlRow:

warning: cannot find type `EventId` in this scope
  --> src/lib.rs:85:39
   |
85 | #[cfg_attr(feature = "diesel", derive(FromSqlRow))]
   |                                       ^^^^^^^^^^ names from parent modules are not accessible without an explicit import
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #50504 <https://github.com/rust-lang/rust/issues/50504>

Steps to reproduce

  1. Check out ruma-identifers at commit 78b0d1e.
  2. Run cargo fix --features diesel --edition.
  3. View output.

Checklist

  • [x] I have already looked over the issue tracker for similar issues.
  • [x] This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)

^ A nightly Rust is required because of the library's use of try_from but the issue being reported is not specific to nightly.

Most helpful comment

That warning is already fixed on master. Release is blocked on getting a review of a few open PR's.

All 3 comments

Here's a link to the Rust issue reported in the warning: https://github.com/rust-lang/rust/issues/50504. It seems the Diesel team (or at least Sean) was already aware of this issue. Maybe now the circumstances have changed since Rust 2018 has shipped and this is now a hard error under the edition.

That warning is already fixed on master. Release is blocked on getting a review of a few open PR's.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

Fuckoffee picture Fuckoffee  路  3Comments

mattico picture mattico  路  4Comments

trha picture trha  路  4Comments

pjenvey picture pjenvey  路  4Comments