Skip to content

Commit

Permalink
Fixed travis.yml some more... removed some version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro3 committed Jul 17, 2019
1 parent a6f2b45 commit 9c68a98
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ matrix:
- julia: nightly
notifications:
email: false
script:
- julia -e 'using Pkg; Pkg.build(); Pkg.test(; coverage=false);'
2 changes: 1 addition & 1 deletion src/SimpleTraits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ into problems, see source code. Also the macro is ugly. PRs welcome...
"""
macro check_fast_traitdispatch(Tr, Arg=:Int, verbose=false)
if Base.JLOptions().code_coverage==1
warn("The SimpleTraits.@check_fast_traitdispatch macro only works when running Julia without --code-coverage")
@warn "The SimpleTraits.@check_fast_traitdispatch macro only works when running Julia without --code-coverage"
return nothing
end
test_fn = gensym()
Expand Down
6 changes: 1 addition & 5 deletions src/base-traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ https://github.com/mauro3/SimpleTraits.jl/issues/40.
"""
@traitdef IsIterator{X}
@generated function SimpleTraits.trait(::Type{IsIterator{X}}) where {X}
if VERSION<v"1-"
error("Not supported in Julia 0.7, due to fallbacks. Should work again in 1.0")
else
hasmethod(iterate, Tuple{X}) ? :(IsIterator{X}) : :(Not{IsIterator{X}})
end
hasmethod(iterate, Tuple{X}) ? :(IsIterator{X}) : :(Not{IsIterator{X}})
end

end # module
1 change: 0 additions & 1 deletion test/base-traits-inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ basetrs = [:IsConcrete=>:Int,
:IsIterator=>:(Dict{Int,Int})]

for (bt, tp) in basetrs
bt==:IsIterator && VERSION<v"1-" && continue # errors on 0.7 due to start/step/done
@test @eval @check_fast_traitdispatch $bt $tp true
end
6 changes: 1 addition & 5 deletions test/base-traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,4 @@ c = view(a, 1:2:5)
struct T9867 end
@test istrait(IsCallable{T9867})

if VERSION<v"1-"
@test_throws ErrorException istrait(IsIterator{Base.UnitRange})
else
@test istrait(IsIterator{Base.UnitRange})
end
@test istrait(IsIterator{Base.UnitRange})

2 comments on commit 9c68a98

@mauro3
Copy link
Owner Author

@mauro3 mauro3 commented on 9c68a98 Jul 17, 2019

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes:

Moved from REQUIRE to Project.toml
Bumped Julia and MacroTool minimal versions

@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 updated: JuliaRegistries/General/2083

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 Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.0 -m "<description of version>" 9c68a9896ad5e77954d2c069d381c58e8ede1fd8
git push origin v0.9.0

Please sign in to comment.