Skip to content

refactor: fix import error with Mathlib#1059

Merged
jstoobysmith merged 4 commits intomasterfrom
fixDistributions
Apr 27, 2026
Merged

refactor: fix import error with Mathlib#1059
jstoobysmith merged 4 commits intomasterfrom
fixDistributions

Conversation

@jstoobysmith
Copy link
Copy Markdown
Member

Put distributions in the namespace Physlib to prevent an error mentioned here

https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/Conflict.20when.20importing.20Mathlib.20and.20Physlib/with/590839433

when importing Physlib and Mathlib at the same time.

More long term solutions to prevent such things are mentioned there.

@jstoobysmith jstoobysmith requested a review from zhikaip April 25, 2026 05:42
-/

@[expose] public section
open Physlib
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
open Physlib
open Physlib

The OCD in me wants the new line (or removing it) to be consistent. Is it possible to have linters that check this or is opening namespaces too ad-hoc?

@@ -40,6 +40,7 @@ properties about it.
-/

@[expose] public section
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
@[expose] public section
@[expose] public section

also for this line, I'm being a bit pedantic here but would be nice if consistent. I think the default from modulising has an extra line gap. Just raising it, it's fine if you think it's better if we don't have this line, maybe we can do a pass on the whole of Physlib later

@jstoobysmith
Copy link
Copy Markdown
Member Author

@zhikaip should have addressed these spacing issues here. I agree that there should be a linter for this and general linters around open.

Copy link
Copy Markdown
Collaborator

@zhikaip zhikaip left a comment

Choose a reason for hiding this comment

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

Many thanks, let's go with this for now.

@jstoobysmith jstoobysmith merged commit b70b5cd into master Apr 27, 2026
4 checks passed
@jstoobysmith jstoobysmith deleted the fixDistributions branch April 27, 2026 07:45
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.

2 participants