-
Notifications
You must be signed in to change notification settings - Fork 479
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
Rename latest to dev. #802
Conversation
~25 packages uses the |
Result from running with this PR: https://fredrikekre.github.io/Literate.jl/stable/ |
Maybe call it |
src/Documenter.jl
Outdated
|
||
osname = "linux", | ||
julia = error("no 'julia' keyword provided."), | ||
|
||
deps = Deps.pip("pygments", "mkdocs"), | ||
make = () -> run(`mkdocs build`), | ||
|
||
devbranch = "master", | ||
devfolder = "dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "directory" is the technically more correct work here, over "folder". So devdir
? devdirectory
? Or even maybe devurl
or devpath
, since it's not even a directory here what we're setting, but the URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devbranchurl
😛
src/Documenter.jl
Outdated
documentation. By default this value is set to `"master"`. | ||
|
||
**`devfolder`** the folder that in-development version of the docs will be deployed. | ||
Defaults to `"dev"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. this is now a breaking change, and will be somewhat chaotic for the users that their URLs suddenly change. Not sure how to handle it at the moment though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking how? I guess links to latest
will break. But otherwise when packages build new docs they will deploy to dev
and also get dev
in the version selector, no?
We can insert a symlink from latest to dev I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then we also have to remove the latest
directory if it exists so idk.
src/Writers/HTMLWriter.jl
Outdated
|
||
# include stable first, and dev at the bottom | ||
"stable" in all_folders && pushfirst!(folders, "stable") | ||
"dev" in all_folders && push!(folders, "dev") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep "dev" at the top, since that's usually the one you want. At least as long as we have all the patch versions in the selector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I'm planning to make this more customizable anyway, but will put at the top for now.
As for |
Lets keep it as |
It's exactly the links I am worried about. This is a pretty big behaviour change I'd say and shouldn't happen silently if we can avoid it. OTOH, the whole point of 0.20.0 is to break backwards compatibility, so we should go forward with it. But we need to figure out what to do with the packages. I see two options at the moment:
|
f35fa1a
to
d1eafef
Compare
Ok, I am happy with this now. See https://fredrikekre.github.io/Literate.jl/stable/ where https://fredrikekre.github.io/Literate.jl/latest/ is symlinked to |
src/Documenter.jl
Outdated
) | ||
# deprecation of latest kwarg (renamed to devbranch) | ||
if latest !== nothing | ||
Base.depwarn("The `latest` keyword argument have been renamed to `devbranch`.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"has been renamed"
src/Documenter.jl
Outdated
if latest !== nothing | ||
Base.depwarn("The `latest` keyword argument have been renamed to `devbranch`.") | ||
devbranch = latest | ||
latest = nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just wanted this not to propagate.
src/Documenter.jl
Outdated
# deprecation of latest kwarg (renamed to devbranch) | ||
if latest !== nothing | ||
Base.depwarn("The `latest` keyword argument have been renamed to `devbranch`.") | ||
devbranch = latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One silly edge case: if the user defines both latest
and devbranch
simultaneously. Might be good to error here just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can know this, if the user have set devbranch
to the defaul. I'll just add an @info
here saying which branch we choose.
src/Documenter.jl
Outdated
# symlink "latest" to devurl to preserve links (remove in some future release) | ||
if devurl != "latest" | ||
rm(joinpath(dirname, "latest"); recursive = true, force = true) | ||
cd(dirname) do; symlink(devurl, "latest"); end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's print a huge warning here as well that we're creating this symlink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to merge this as is. I might want to iterate on this a bit more at some point, but no need to hold this PR back.
I think this might be easier to do before removing
stable
.