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

Remove internal liblog #40347

Merged
merged 1 commit into from
Mar 26, 2017
Merged

Remove internal liblog #40347

merged 1 commit into from
Mar 26, 2017

Conversation

alexcrichton
Copy link
Member

This commit deletes the internal liblog in favor of the implementation that
lives on crates.io. Similarly it's also setting a convention for adding crates
to the compiler. The main restriction right now is that we want compiler
implementation details to be unreachable from normal Rust code (e.g. requires a
feature), and by default everything in the sysroot is reachable via extern crate.

The proposal here is to require that crates pulled in have these lines in their
src/lib.rs:

#![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]

This'll mean that by default they're not using these attributes but when
compiled as part of the compiler they do a few things:

  • Mark themselves as entirely unstable via the staged_api feature and the
    #![unstable] attribute.
  • Allow usage of other unstable crates via feature(rustc_private) which is
    required if the crate relies on any other crates to compile (other than std).

@rust-highfive
Copy link
Collaborator

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @brson

Note that this is the first crates.io crate to be included in the compiler itself, but I believe that everything is ironed out!

Also note that we have a test if a crate is used and the annotations above are forgotten. We also have license checking for crates.io deps to get errors by default if were working with unusual licenses.

@rust-highfive rust-highfive assigned brson and unassigned arielb1 Mar 8, 2017
@hanna-kruppe
Copy link
Contributor

I seem to recall that the behavior of debug! diverged between these two logging libraries: the internal version (the one being removed here) strips them if debug_assertions are disabled, while the crates.io version doesn't. Is this correct, and if so, are we okay with changing that?

@alexcrichton
Copy link
Member Author

@rkruppe for the compiler I've now enabled the release_max_level_info which I believe should have the same effect.

@alexcrichton
Copy link
Member Author

(good catch!)

@brson
Copy link
Contributor

brson commented Mar 9, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Mar 9, 2017

📌 Commit 5f10bb5 has been approved by brson

@alexcrichton
Copy link
Member Author

@bors: r-

this breaks a number of crates

@steveklabnik
Copy link
Member

this breaks a number of crates

How did you determine this?

@alexcrichton
Copy link
Member Author

Heh via wizardry :)

(the travis logs also indicate this)

I have suspicions for what's going on here and how to fix it, I don't have time to act on them just yet though.

@bors
Copy link
Contributor

bors commented Mar 11, 2017

☔ The latest upstream changes (presumably #40432) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member Author

@bors: r=brson

@bors
Copy link
Contributor

bors commented Mar 16, 2017

📌 Commit a4bd5e9 has been approved by brson

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 17, 2017
Remove internal liblog

This commit deletes the internal liblog in favor of the implementation that
lives on crates.io. Similarly it's also setting a convention for adding crates
to the compiler. The main restriction right now is that we want compiler
implementation details to be unreachable from normal Rust code (e.g. requires a
feature), and by default everything in the sysroot is reachable via `extern
crate`.

The proposal here is to require that crates pulled in have these lines in their
`src/lib.rs`:

    #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
    #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]

This'll mean that by default they're not using these attributes but when
compiled as part of the compiler they do a few things:

* Mark themselves as entirely unstable via the `staged_api` feature and the
  `#![unstable]` attribute.
* Allow usage of other unstable crates via `feature(rustc_private)` which is
  required if the crate relies on any other crates to compile (other than std).
@frewsxcv
Copy link
Member

It looks like Travis hit an ICE. Is that related to these changes?

@alexcrichton
Copy link
Member Author

No idea how, but my guess is yes :(

@bors: r-

@alexcrichton
Copy link
Member Author

@bors: r+

@frewsxcv I wouldn't recommend rolling this up though...

@bors
Copy link
Contributor

bors commented Mar 17, 2017

📌 Commit e4af5fd has been approved by alexcrichton

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 18, 2017
Remove internal liblog

This commit deletes the internal liblog in favor of the implementation that
lives on crates.io. Similarly it's also setting a convention for adding crates
to the compiler. The main restriction right now is that we want compiler
implementation details to be unreachable from normal Rust code (e.g. requires a
feature), and by default everything in the sysroot is reachable via `extern
crate`.

The proposal here is to require that crates pulled in have these lines in their
`src/lib.rs`:

    #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
    #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]

This'll mean that by default they're not using these attributes but when
compiled as part of the compiler they do a few things:

* Mark themselves as entirely unstable via the `staged_api` feature and the
  `#![unstable]` attribute.
* Allow usage of other unstable crates via `feature(rustc_private)` which is
  required if the crate relies on any other crates to compile (other than std).
@alexcrichton
Copy link
Member Author

@bors: r=brson

@bors
Copy link
Contributor

bors commented Mar 23, 2017

📌 Commit e341d60 has been approved by brson

@bors
Copy link
Contributor

bors commented Mar 24, 2017

⌛ Testing commit e341d60 with merge 4509a6e...

@bors
Copy link
Contributor

bors commented Mar 24, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

alexcrichton commented Mar 24, 2017 via email

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 25, 2017
Remove internal liblog

This commit deletes the internal liblog in favor of the implementation that
lives on crates.io. Similarly it's also setting a convention for adding crates
to the compiler. The main restriction right now is that we want compiler
implementation details to be unreachable from normal Rust code (e.g. requires a
feature), and by default everything in the sysroot is reachable via `extern
crate`.

The proposal here is to require that crates pulled in have these lines in their
`src/lib.rs`:

    #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
    #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]

This'll mean that by default they're not using these attributes but when
compiled as part of the compiler they do a few things:

* Mark themselves as entirely unstable via the `staged_api` feature and the
  `#![unstable]` attribute.
* Allow usage of other unstable crates via `feature(rustc_private)` which is
  required if the crate relies on any other crates to compile (other than std).
bors added a commit that referenced this pull request Mar 25, 2017
Rollup of 11 pull requests

- Successful merges: #40347, #40501, #40516, #40524, #40540, #40642, #40683, #40764, #40778, #40807, #40809
- Failed merges: #40771
bors added a commit that referenced this pull request Mar 25, 2017
Rollup of 11 pull requests

- Successful merges: #40347, #40501, #40516, #40524, #40540, #40642, #40683, #40764, #40778, #40807, #40809
- Failed merges: #40771
@bors
Copy link
Contributor

bors commented Mar 25, 2017

⌛ Testing commit e341d60 with merge 1ff1f1d...

@bors
Copy link
Contributor

bors commented Mar 25, 2017

💔 Test failed - status-travis

@arielb1
Copy link
Contributor

arielb1 commented Mar 25, 2017

@bors
Copy link
Contributor

bors commented Mar 25, 2017

⌛ Testing commit e341d60 with merge 6b90ac4...

@bors
Copy link
Contributor

bors commented Mar 25, 2017

💔 Test failed - status-travis

@arielb1
Copy link
Contributor

arielb1 commented Mar 25, 2017

@bors
Copy link
Contributor

bors commented Mar 25, 2017

⌛ Testing commit e341d60 with merge e092448...

@bors
Copy link
Contributor

bors commented Mar 25, 2017

💔 Test failed - status-travis

@arielb1
Copy link
Contributor

arielb1 commented Mar 25, 2017

@bors
Copy link
Contributor

bors commented Mar 26, 2017

⌛ Testing commit e341d60 with merge 7dd4e2d...

bors added a commit that referenced this pull request Mar 26, 2017
Remove internal liblog

This commit deletes the internal liblog in favor of the implementation that
lives on crates.io. Similarly it's also setting a convention for adding crates
to the compiler. The main restriction right now is that we want compiler
implementation details to be unreachable from normal Rust code (e.g. requires a
feature), and by default everything in the sysroot is reachable via `extern
crate`.

The proposal here is to require that crates pulled in have these lines in their
`src/lib.rs`:

    #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
    #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]

This'll mean that by default they're not using these attributes but when
compiled as part of the compiler they do a few things:

* Mark themselves as entirely unstable via the `staged_api` feature and the
  `#![unstable]` attribute.
* Allow usage of other unstable crates via `feature(rustc_private)` which is
  required if the crate relies on any other crates to compile (other than std).
@bors
Copy link
Contributor

bors commented Mar 26, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: brson
Pushing 7dd4e2d to master...

@bors bors merged commit e341d60 into rust-lang:master Mar 26, 2017
@alexcrichton alexcrichton deleted the rm-liblog branch April 4, 2017 23:08
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.

10 participants