Skip to content

Commit

Permalink
Fix precompilation warnings downstream (#466)
Browse files Browse the repository at this point in the history
* Fix precompilation warnings downstream

* Revert "Fix precompilation warnings downstream"

restore initialization during precompilation for downstream packages

This reverts commit 985c968.

* avoid downloads timer hang during precompilation

by setting a default downloader with shorter grace time

* bump version

* adjust downloads.jl compat

* set downloader only when available (julia >= 1.10)

---------

Co-authored-by: Benjamin Lorenz <[email protected]>
  • Loading branch information
thofma and benlorenz authored Jan 4, 2024
1 parent b9f8d1c commit c58cb20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name = "Polymake"
uuid = "d720cf60-89b5-51f5-aff5-213f193123e7"
repo = "https://github.com/oscar-system/Polymake.jl.git"
version = "0.11.9"
version = "0.11.10"

[deps]
BinaryWrappers = "f01c122e-0ea1-4f85-ad8f-907073ad7a9f"
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Mongoc = "4fe8b98c-fc19-5c23-8ec2-168ff83495f2"
Expand All @@ -25,10 +26,11 @@ polymake_oscarnumber_jll = "10f31823-b687-53e6-9f29-edb9d4da9f9f"
[compat]
BinaryWrappers = "~0.1.0"
CxxWrap = "~0.14"
Downloads = "^1.4"
JSON = "^0.20, ^0.21"
Libdl = "^1.6"
Mongoc = "~0.6.0, ~0.7.0, ~0.8.0, ~0.9.0"
MozillaCACerts_jll = "2020 - 2023"
MozillaCACerts_jll = "2020 - 2024"
Ninja_jll = "^1.11.1"
Perl_jll = "^5.34.0"
Pkg = "^1.6"
Expand Down
9 changes: 9 additions & 0 deletions src/Polymake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Base: ==, <, <=, *, -, +, //, ^, div, rem, one, zero,
union, union!

import Pkg
import Downloads
import JSON

using SparseArrays
Expand Down Expand Up @@ -181,8 +182,16 @@ function __init__()
# to avoid conflicts between symlinks and directories we switch to a new depstree folder name
polymake_deps_tree = @get_scratch!("$(scratch_key)_depstree_v2")

@static if isdefined(Downloads, :default_downloader!)
# work around long Downloads.jl timer
Downloads.default_downloader!(Downloads.Downloader(grace=0.01))
end
# we run this on every init to make sure all artifacts still exist
prepare_deps_tree(polymake_deps_tree)
@static if isdefined(Downloads, :default_downloader!)
# restore default
Downloads.default_downloader!()
end

polymake_user_dir = @get_scratch!("$(scratch_key)_userdir")

Expand Down

2 comments on commit c58cb20

@benlorenz
Copy link
Member

Choose a reason for hiding this comment

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

@JuliaRegistrator: register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/98203

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.11.10 -m "<description of version>" c58cb20c893c60b457426dbe5f6416c05749695b
git push origin v0.11.10

Please sign in to comment.