Skip to content

Commit

Permalink
Merge pull request #242 from JuliaInterop/close-default-context
Browse files Browse the repository at this point in the history
Close the default Context in the precompilation workload
  • Loading branch information
JamesWrigley authored Jun 13, 2024
2 parents 2032aef + fe20fa4 commit 7f070fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ZMQ"
uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1"
version = "1.2.5"
version = "1.2.6"

[deps]
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
Expand Down
7 changes: 6 additions & 1 deletion docs/src/_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ CurrentModule = ZMQ
This documents notable changes in ZMQ.jl. The format is based on [Keep a
Changelog](https://keepachangelog.com).

## Unreleased
## [v1.2.6] - 2024-06-13

### Added

- [`lib_version()`](@ref) to get the libzmq version ([#240]).

### Fixed

- Fixed a precompilation bug that would cause creating a sysimage with
PackageCompiler.jl on Julia 1.6 to fail ([#242]).

## [v1.2.5] - 2024-05-28

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions src/ZMQ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ import PrecompileTools: @compile_workload
unsafe_string(ZMQ.recv(s2))
ZMQ.close(s1)
ZMQ.close(s2)

# Using the library like this workload will initialize ZMQ._context, which
# contains a pointer. This doesn't seem to play well with serialization on
# Julia 1.6 with PackageCompiler so we explicitly close it to reset the
# pointer.
# See: https://github.com/JuliaLang/julia/issues/46214
close(ZMQ._context)
end

end

2 comments on commit 7f070fe

@JamesWrigley
Copy link
Member Author

Choose a reason for hiding this comment

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

@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/108890

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 v1.2.6 -m "<description of version>" 7f070fefb2c09335965dcfc684c91128daafce83
git push origin v1.2.6

Please sign in to comment.