-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to Julia v1.9 * Version bump * check 1.7 and windows * remove unsupported platforms * unique topic names * Test sysimage generation * Fix dev call * Fix deps * Fix sysimage test code * Fix cert path * always show resp * remoev 1.7 * update julia compat to 1.9
- Loading branch information
1 parent
f68bb2c
commit 79db7ad
Showing
11 changed files
with
138 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/docs/build/ | ||
Manifest.toml | ||
log.txt | ||
|
||
.vscode/* | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# Built Visual Studio Code Extensions | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Manifest.toml | ||
sysimage/sysimage.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name = "Foo" | ||
uuid = "97f99e65-a432-4aef-bc58-bf7726a8fb32" | ||
version = "0.1.0" | ||
|
||
[deps] | ||
AWSCRT = "df31ea59-17a4-4ebd-9d69-4f45266dc2c7" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module Foo | ||
|
||
using AWSCRT | ||
using AWSCRT.LibAWSCRT | ||
using Random | ||
using Test | ||
|
||
function start() | ||
if ENV["MQTT_ENABLED"] == "true" | ||
tls_ctx_options = create_client_with_mtls( | ||
ENV["CERT_STRING"], | ||
ENV["PRI_KEY_STRING"], | ||
ca_filepath = joinpath(dirname(dirname(@__DIR__)), "test", "certs", "AmazonRootCA1.pem"), | ||
) | ||
tls_ctx = ClientTLSContext(tls_ctx_options) | ||
client = MQTTClient(tls_ctx) | ||
connection = MQTTConnection(client) | ||
client_id = "unknown-client-id-$(Random.randstring(6))" | ||
@show client_id | ||
task = connect( | ||
connection, | ||
ENV["ENDPOINT"], | ||
8883, | ||
client_id; | ||
on_connection_interrupted = (conn, error_code) -> begin | ||
@warn "connection interrupted" error_code | ||
end, | ||
on_connection_resumed = (conn, return_code, session_present) -> begin | ||
@info "connection resumed" return_code session_present | ||
end, | ||
) | ||
resp = fetch(task) | ||
@show resp | ||
if resp != Dict(:session_present => false) | ||
error("connect returned bad response: $resp") | ||
end | ||
end | ||
return nothing | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[deps] | ||
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using PackageCompiler | ||
|
||
function build() | ||
sysimage_path = joinpath(@__DIR__, "sysimage.so") | ||
create_sysimage( | ||
["Foo"]; | ||
project = dirname(@__DIR__), | ||
sysimage_path, | ||
# precompile_execution_file = joinpath(@__DIR__, "precompile.jl"), | ||
precompile_statements_file = joinpath(@__DIR__, "precompile_list.jl"), | ||
cpu_target = "generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)", | ||
incremental = true, | ||
include_transitive_dependencies = true, | ||
) | ||
return sysimage_path | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
using Foo | ||
Foo.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# this file contains all the precompiles generated by using precompile.jl | ||
|
||
# these precompiles do not cause the segfault | ||
precompile(Tuple{typeof(Base.:(!=)), UInt64, UInt64}) | ||
precompile(Tuple{typeof(Base.invokelatest), Any}) | ||
precompile(Tuple{Base.var"##s78#203", Any, Any, Any, Any, Any}) | ||
precompile(Tuple{typeof(Base.merge_types), Tuple{Vararg{Symbol}}, Type{var"#s78"} where var"#s78"<:(NamedTuple{names, T} where T<:Tuple where names), Type{var"#s77"} where var"#s77"<:(NamedTuple{names, T} where T<:Tuple where names)}) | ||
precompile(Tuple{Core.Compiler.var"#273#274", Any, Any}) | ||
precompile(Tuple{typeof(Base.uv_asynccb), Ptr{Nothing}}) | ||
precompile(Tuple{typeof(AWSCRT.__init__)}) | ||
precompile(Tuple{typeof(AWSCRT.on_connection_complete), Ptr{LibAWSCRT.aws_mqtt_client_connection}, Int32, Int32, UInt8, Ptr{Nothing}}) | ||
|
||
# including the below precompiles causes the segfault | ||
precompile(Tuple{typeof(Foo.start)}) |
79db7ad
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.
@JuliaRegistrator register
79db7ad
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.
Registration pull request created: JuliaRegistries/General/84165
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: