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

feat: allow multiple --to and --from flags #40

Merged
merged 7 commits into from
Oct 30, 2024
Merged

feat: allow multiple --to and --from flags #40

merged 7 commits into from
Oct 30, 2024

Conversation

kim-em
Copy link
Collaborator

@kim-em kim-em commented Oct 29, 2024

This is stacked on top of #39.

let outFiles ← try unsafe withImportModules #[{module := to}] {} (trustLevel := 1024) fun env => do
let p := ImportGraph.getModule to
let outFiles ← try unsafe withImportModules (to.map ({module := ·})) {} (trustLevel := 1024) fun env => do
let toModule := ImportGraph.getModule to[0]!
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be toPackage, given your rename above?

I think so far I used "module" and "package" as synonyms (by mistake), maybe I need to clean this up in a future PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, this one is actually a module (i.e. "file"), not a package (e.g. "Mathlib" or "Batteries").

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think ImportGraph.getModule "Mathlib.Algebra.Basic" yields "Mathlib", which I think of as the package name, but you're right it's simultaneously also the main module of the package. (I think; you see I find some details of lake a bit confusing)

Anyways let's leave it as is for now

Main.lean Outdated Show resolved Hide resolved
Main.lean Outdated Show resolved Hide resolved
Main.lean Outdated Show resolved Hide resolved
@joneugster joneugster merged commit c1970be into main Oct 30, 2024
2 checks passed
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