diff --git a/.github/workflows/RunTestsNoIncrementalPrecompile.yml b/.github/workflows/RunTestsNoIncrementalPrecompile.yml new file mode 100644 index 0000000..3f831d8 --- /dev/null +++ b/.github/workflows/RunTestsNoIncrementalPrecompile.yml @@ -0,0 +1,30 @@ +name: CI +on: + - push + - pull_request +defaults: + run: + shell: bash +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + version: + - '1' + - 'nightly' + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/julia-buildpkg@latest + - name: Run tests without incremental precompilation + run: julia --compiled-modules=no --project -e "using Pkg; Pkg.test()" diff --git a/Project.toml b/Project.toml index 2b835d7..24e046a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ConstructionBase" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" authors = ["Takafumi Arakaki", "Rafael Schouten", "Jan Weidner"] -version = "1.4.0" +version = "1.4.1" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/src/ConstructionBase.jl b/src/ConstructionBase.jl index 86a7be4..af52cae 100644 --- a/src/ConstructionBase.jl +++ b/src/ConstructionBase.jl @@ -5,7 +5,6 @@ export setproperties export constructorof export getfields - # Use markdown files as docstring: for (name, path) in [ :ConstructionBase => joinpath(dirname(@__DIR__), "README.md"), @@ -49,6 +48,10 @@ getfields(x::NamedTuple) = x getproperties(o::NamedTuple) = o getproperties(o::Tuple) = o +function is_propertynames_overloaded(T::Type)::Bool + which(propertynames, Tuple{T}).sig !== Tuple{typeof(propertynames), Any} +end + @generated function check_properties_are_fields(obj) if is_propertynames_overloaded(obj) return quote @@ -68,10 +71,6 @@ getproperties(o::Tuple) = o end end -function is_propertynames_overloaded(T::Type)::Bool - which(propertynames, Tuple{T}).sig !== Tuple{typeof(propertynames), Any} -end - if VERSION >= v"1.7" function getproperties(obj) fnames = propertynames(obj) diff --git a/src/functions.jl b/src/functions.jl index 5c88b47..739aacd 100644 --- a/src/functions.jl +++ b/src/functions.jl @@ -3,6 +3,7 @@ # one for them based on the types of args passed to FunctionConstructor struct FunctionConstructor{F} end +_isgensym(s::Symbol) = occursin("#", string(s)) @generated function (fc::FunctionConstructor{F})(args...) where F T = getfield(parentmodule(F), nameof(F)) @@ -20,4 +21,3 @@ function ConstructionBase.constructorof(f::Type{F}) where F <: Function FunctionConstructor{F}() end -_isgensym(s::Symbol) = occursin("#", string(s))