Skip to content

Commit

Permalink
Merge pull request #66 from JuliaObjects/hint
Browse files Browse the repository at this point in the history
Fix worldage issue #64
  • Loading branch information
jw3126 authored Aug 22, 2022
2 parents 4ca3d7d + 7c1b2d0 commit 40800e1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/RunTestsNoIncrementalPrecompile.yml
Original file line number Diff line number Diff line change
@@ -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()"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
9 changes: 4 additions & 5 deletions src/ConstructionBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -20,4 +21,3 @@ function ConstructionBase.constructorof(f::Type{F}) where F <: Function
FunctionConstructor{F}()
end

_isgensym(s::Symbol) = occursin("#", string(s))

2 comments on commit 40800e1

@jw3126
Copy link
Member Author

@jw3126 jw3126 commented on 40800e1 Aug 22, 2022

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/66753

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.4.1 -m "<description of version>" 40800e17ef953c5cccaeef2d1d651346cacc5014
git push origin v1.4.1

Please sign in to comment.