Skip to content

[Merged by Bors] - fix: avoid using custom parser combinators#20355

Closed
eric-wieser wants to merge 2 commits intomasterfrom
eric-wieser/no-subscript-parser
Closed

[Merged by Bors] - fix: avoid using custom parser combinators#20355
eric-wieser wants to merge 2 commits intomasterfrom
eric-wieser/no-subscript-parser

Conversation

@eric-wieser
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser commented Dec 31, 2024

These are not supported unless enableInitializersExecution is called, and various downstream scripts do not call this.

https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/lean4checker.20failure/near/486191171 has some context for the underlying issue, which seems to be that Lean tries to finalize environment extensions even if initializers are disabled, leading to crashes if those extensions (such as the parser alias table) expect initializers to have run.

To prove this works, this removes Lean.enableInitializersExecution from the script to check the yaml files.
This is what we will want to do anyway after leanprover/lean4#6325 lands, as this script should not need to run any extensions.


Open in Gitpod

These are not supported unless `enableInitializersExecution` is called,
and various downstream scripts do not call this.

https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/lean4checker.20failure/near/486191171 has some context for the underlying issue,
which seems to be that Lean tries to finalize environment extensions even if initializers are disabled,
leading to crashes if those extensions (such as the parser alias table) expect initializers to have run.
@github-actions
Copy link
Copy Markdown

PR summary ed180cd79f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ subscriptTerm
+ superscriptTerm

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Jan 3, 2025

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Jan 3, 2025
mathlib-bors bot pushed a commit that referenced this pull request Jan 3, 2025
These are not supported unless `enableInitializersExecution` is called, and various downstream scripts do not call this.

https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/lean4checker.20failure/near/486191171 has some context for the underlying issue, which seems to be that Lean tries to finalize environment extensions even if initializers are disabled, leading to crashes if those extensions (such as the parser alias table) expect initializers to have run.

To prove this works, this removes `Lean.enableInitializersExecution` from the script to check the yaml files.
This is what we will want to do anyway after leanprover/lean4#6325 lands, as this script should not need to run any extensions.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 3, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title fix: avoid using custom parser combinators [Merged by Bors] - fix: avoid using custom parser combinators Jan 3, 2025
@mathlib-bors mathlib-bors bot closed this Jan 3, 2025
@mathlib-bors mathlib-bors bot deleted the eric-wieser/no-subscript-parser branch January 3, 2025 11:52
mathlib-bors bot pushed a commit that referenced this pull request Mar 10, 2025
We provide macros for the following notations:
- `⦋m⦌ₙ` denotes the `m`-dimensional simplex in the `n`-truncated simplex category.
- `X _⦋m⦌ₙ` denotes the `m`-th term of an `n`-truncated simplicial object `X`.
- `X ^⦋m⦌ₙ` denotes the `m`-th term of an `n`-truncated cosimplicial object `X`.

For all of these notations, the truncation proof `p : m ≤ n` can also be provided using the syntax `⦋m, p⦌ₙ`, `X _⦋m, p⦌ₙ`, and `X ^⦋m, p⦌ₙ`, respectively.

These notations generalize those already in use in `HomotopyCat.lean` and `Coskeletal.lean`.

Delaborators for these notations are added in #20719.

See #17732 and #20355 to understand the reason for the use of `subscriptTerm`.



Co-authored-by: gio256 <gio256@protonmail.com>
tukamilano pushed a commit that referenced this pull request Mar 20, 2025
We provide macros for the following notations:
- `⦋m⦌ₙ` denotes the `m`-dimensional simplex in the `n`-truncated simplex category.
- `X _⦋m⦌ₙ` denotes the `m`-th term of an `n`-truncated simplicial object `X`.
- `X ^⦋m⦌ₙ` denotes the `m`-th term of an `n`-truncated cosimplicial object `X`.

For all of these notations, the truncation proof `p : m ≤ n` can also be provided using the syntax `⦋m, p⦌ₙ`, `X _⦋m, p⦌ₙ`, and `X ^⦋m, p⦌ₙ`, respectively.

These notations generalize those already in use in `HomotopyCat.lean` and `Coskeletal.lean`.

Delaborators for these notations are added in #20719.

See #17732 and #20355 to understand the reason for the use of `subscriptTerm`.



Co-authored-by: gio256 <gio256@protonmail.com>
idontgetoutmuch pushed a commit to idontgetoutmuch/mathlib4 that referenced this pull request Apr 7, 2025
…ommunity#20688)

We provide macros for the following notations:
- `⦋m⦌ₙ` denotes the `m`-dimensional simplex in the `n`-truncated simplex category.
- `X _⦋m⦌ₙ` denotes the `m`-th term of an `n`-truncated simplicial object `X`.
- `X ^⦋m⦌ₙ` denotes the `m`-th term of an `n`-truncated cosimplicial object `X`.

For all of these notations, the truncation proof `p : m ≤ n` can also be provided using the syntax `⦋m, p⦌ₙ`, `X _⦋m, p⦌ₙ`, and `X ^⦋m, p⦌ₙ`, respectively.

These notations generalize those already in use in `HomotopyCat.lean` and `Coskeletal.lean`.

Delaborators for these notations are added in leanprover-community#20719.

See leanprover-community#17732 and leanprover-community#20355 to understand the reason for the use of `subscriptTerm`.



Co-authored-by: gio256 <gio256@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants