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

Introduce -Zterminal-urls to use OSC8 for error codes #107838

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Feb 9, 2023

Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like <a href="URL"> does in HTML.

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2023

r? @nagisa

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 9, 2023
@estebank
Copy link
Contributor Author

estebank commented Feb 9, 2023

Filed rust-lang/compiler-team#587 for team approval

@estebank estebank force-pushed the terminal_hyperlinks branch 4 times, most recently from b5927e4 to 171c9b1 Compare February 9, 2023 11:12
@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@estebank estebank force-pushed the terminal_hyperlinks branch 2 times, most recently from 8cc2439 to 456120b Compare February 9, 2023 11:41
@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2023

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Terminals supporting the OSC8 Hyperlink Extension can support inline
anchors where the text is user defineable but clicking on it opens a
browser to a specified URLs, just like `<a href="URL">` does in HTML.

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
@nagisa
Copy link
Member

nagisa commented Feb 12, 2023

@bors r+ this makes sense to me as an unstable flag, I don’t think we need a full FCP for that? That said a proper stable implementation would detect support for this via termcaps (I think?) which is missing from this PR.

@bors
Copy link
Contributor

bors commented Feb 12, 2023

📌 Commit a576514 has been approved by nagisa

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#107340 (rustdoc: merge doctest tooltip with notable traits tooltip)
 - rust-lang#107838 (Introduce `-Zterminal-urls` to use OSC8 for error codes)
 - rust-lang#107922 (Print disk usage in PGO CI script)
 - rust-lang#107931 (Intern span when length is MAX_LEN with parent.)
 - rust-lang#107935 (rustc_ast: Merge impls and reorder methods for attributes and meta items)
 - rust-lang#107986 (layout: deal with placeholders, ICE on bound types)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 780beae into rust-lang:master Feb 13, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 13, 2023
@estebank
Copy link
Contributor Author

a proper stable implementation would detect support for this via termcaps

@nagisa gcc relies on a handful of checks for "known good" and "known bad" terminals, because the feature is supposed to be transparently ignored by terminals that don't recognize it, but in practice some don't. The checks that gcc seems to do are imo insufficient, but serviceable and we should likely do something similar. Don't know what the path to setting auto by default is gonna look like.

Jarcho pushed a commit to Jarcho/rust that referenced this pull request Feb 26, 2023
…gisa

Introduce `-Zterminal-urls` to use OSC8 for error codes

Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML.

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
qinheping added a commit to qinheping/kani that referenced this pull request Mar 10, 2023
Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
Unify validity checks into a single query rust-lang/rust#108364
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
Switch to EarlyBinder for type_of query rust-lang/rust#107753
Rename interner funcs rust-lang/rust#108250
Optimize mk_region rust-lang/rust#108020
Clarify iterator interners rust-lang/rust#108112
qinheping added a commit to qinheping/kani that referenced this pull request Mar 10, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig pushed a commit to qinheping/kani that referenced this pull request Mar 17, 2023
- Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029
- Use target instead of machine for mir interpreter integer handling rust-lang/rust#108047
- Switch to EarlyBinder for type_of query rust-lang/rust#107753
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
tautschnig added a commit to tautschnig/kani that referenced this pull request Apr 15, 2023
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those
ICE when trying to build kani with:
```
error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>}
```

This issue was reported upstream as
rust-lang/rust#107898, and fixed in
rust-lang/rust#107940, which isn't part of any
of the above nightlies.

Doing this multi-day update also requires addressing:

Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029

Co-authored-by: Qinheping Hu <[email protected]>
tautschnig added a commit to tautschnig/kani that referenced this pull request Apr 15, 2023
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those
ICE when trying to build kani with:
```
error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>}
```

This issue was reported upstream as
rust-lang/rust#107898, and fixed in
rust-lang/rust#107940, which isn't part of any
of the above nightlies.

Doing this multi-day update also requires addressing:

Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029

Co-authored-by: Qinheping Hu <[email protected]>
tautschnig added a commit to tautschnig/kani that referenced this pull request Apr 15, 2023
Skip over all the nightlies from 2023-02-06 until 2023-02-15 as those
ICE when trying to build kani with:
```
error: internal compiler error: cannot relate constants (Const { ty: fn() -> usize {std::mem::size_of::<[T; N]>}, kind: Value(Branch([])) }, Const { ty: fn() -> usize {std::mem::size_of::<[T; _]>}, kind: Value(Branch([])) }) of different types: fn() -> usize {std::mem::size_of::<[T; N]>} != fn() -> usize {std::mem::size_of::<[T; _]>}
```

This issue was reported upstream as
rust-lang/rust#107898, and fixed in
rust-lang/rust#107940, which isn't part of any
of the above nightlies.

Doing this multi-day update also requires addressing:

Remove some superfluous type parameters from layout.rs rust-lang/rust#107163
Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
s/eval_usize/eval_target_usize/ for clarity rust-lang/rust#108029

Co-authored-by: Qinheping Hu <[email protected]>
tautschnig pushed a commit to qinheping/kani that referenced this pull request Apr 17, 2023
- Introduce -Zterminal-urls to use OSC8 for error codes rust-lang/rust#107838
- Unify validity checks into a single query rust-lang/rust#108364
- Rename interner funcs rust-lang/rust#108250
- Optimize mk_region rust-lang/rust#108020
- Clarify iterator interners rust-lang/rust#108112
@estebank estebank deleted the terminal_hyperlinks branch November 9, 2023 05:11
@workingjubilee workingjubilee added the -Zterminal-urls Unstable option: emit OSC8 hyperlinks in diagnostics label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zterminal-urls Unstable option: emit OSC8 hyperlinks in diagnostics S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants