Skip to content

using mdgen instead of lean2md #123

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

Merged
merged 7 commits into from
Jan 9, 2024
Merged

Conversation

Seasawher
Copy link
Contributor

@Seasawher Seasawher commented Jan 8, 2024

resolve #122

@arthurpaulino Replacing lean2md with mdgen does not seem to break the markdown file. However, the contents of the files in the lean directory are different from the contents of the files in the md directory, resulting in a large number of diffs. What should I do?

Should the contents of the lean directory be respected or the md directory?

@Seasawher Seasawher changed the title using mdgen instead of lean2md #122 using mdgen instead of lean2md Jan 8, 2024
@Seasawher
Copy link
Contributor Author

Seasawher commented Jan 8, 2024

By the way, since the contents of the md directory can be generated from the lean directory, there is no need to version control the md directory. If you need a human-readable format, you can host it on the web using mdbook. see #121

Copy link
Collaborator

@Julian Julian left a comment

Choose a reason for hiding this comment

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

Should the contents of the lean directory be respected or the md directory?

The diff here looks correct (i.e. the changes look like an improvement) -- probably what happened was that lean2md wasn't run on the .lean files -- you generated the PR from those (the .lean files), correct?

@@ -8,6 +8,9 @@ lean_lib «lean4-metaprogramming-book» where
roots := #[`cover, `extra, `main, `solutions]
globs := #[Glob.one `cover, Glob.submodules `extra, Glob.submodules `main, Glob.submodules `solutions]

require mdgen from git
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you publish a release (and put that here) so we don't run into silent breakage if something changes?

@@ -17,23 +20,3 @@ def runCmd (cmd : String) (args : Array String) : ScriptM Bool := do
if hasError then
IO.eprint out.stderr
return hasError

script build do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps it's worth leaving lake run build in place and simply updating it -- that makes it slightly easier for someone to build the md files if needed, without needing to look up mdgen's CLI syntax.

@Julian
Copy link
Collaborator

Julian commented Jan 8, 2024

Thanks! This looks pretty good to me! I didn't try running mdgen yet, but I'll do that.

As for

By the way, since the contents of the md directory can be generated from the lean directory, there is no need to version control the md directory. If you need a human-readable format, you can host it on the web using mdbook. see #121

That sounds good to me as well, will have a look at that PR.

@Seasawher
Copy link
Contributor Author

@Julian I have made corrections to the points you pointed out.

@Julian
Copy link
Collaborator

Julian commented Jan 9, 2024

This looks good I think! Let's merge and see how it goes. Thanks!

@Julian Julian merged commit 9ac7ba3 into leanprover-community:master Jan 9, 2024
@Seasawher Seasawher deleted the mdgen branch January 9, 2024 23:11
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.

using mdgen instead of lean2md
2 participants