Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates for julia 0.7 #68

Merged
merged 2 commits into from
Oct 11, 2018
Merged

updates for julia 0.7 #68

merged 2 commits into from
Oct 11, 2018

Conversation

fredrikekre
Copy link
Member

No description provided.

@coveralls
Copy link

coveralls commented May 7, 2018

Coverage Status

Coverage increased (+12.05%) to 93.411% when pulling 7718c39 on fredrikekre:fe/julia07 into 6f16bfb on JuliaCI:master.

@Datseris
Copy link
Contributor

Hello. Is there any update in making PkgBenchmark work for Julia 0.7? It would be a great help for package developers that want to move over.

@Gnimuc
Copy link

Gnimuc commented Jun 20, 2018

I still get this error with this PR, maybe it needs to be upgraded using the new Pkg APIs.

┌ Warning: Pkg.dir is only kept for legacy CI script reasons
└ @ Pkg.API API.jl:405
ERROR: UndefVarError: Reqs not defined
Stacktrace:
 [1] getproperty at ./sysimg.jl:13 [inlined]
 [2] _with_reqs(::getfield(PkgBenchmark, Symbol("##21#25")){Bool,String}, ::String, ::Function) at /Users/gnimuc/.julia/dev/PkgBenchmark/src/util.jl:5
 [3] (::getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String})() at /Users/gnimuc/.julia/dev/PkgBenchmark/src/runbenchmark.jl:83
 [4] (::getfield(PkgBenchmark, Symbol("##52#53")){getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String},String,String})(::LibGit2.GitRepo) at /Users/gnimuc/.julia/dev/PkgBenchmark/src/util.jl:38
 [5] transact(::getfield(PkgBenchmark, Symbol("##52#53")){getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String},String,String}, ::LibGit2.GitRepo) at /Users/gnimuc/Codes/julia/usr/share/julia/stdlib/v0.7/LibGit2/src/LibGit2.jl:951
 [6] _withcommit(::getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String}, ::LibGit2.GitRepo, ::String) at /Users/gnimuc/.julia/dev/PkgBenchmark/src/util.jl:34
 [7] #benchmarkpkg#20(::Nothing, ::Nothing, ::Bool, ::String, ::Function, ::String, ::String) at /Users/gnimuc/.julia/dev/PkgBenchmark/src/runbenchmark.jl:105
 [8] benchmarkpkg(::String, ::String) at /Users/gnimuc/.julia/dev/PkgBenchmark/src/runbenchmark.jl:42
 [9] top-level scope at none:0
julia> versioninfo()
Julia Version 0.7.0-alpha.59
Commit 2a45839ef9 (2018-06-09 17:04 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin17.6.0)
  CPU: Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

@KristofferC
Copy link
Collaborator

Indeed, the Pkg system is now completely different and there isn't right now really a straight up replacement. Easiest would be to remove the benchmark/REQUIRE functionality.

@Datseris
Copy link
Contributor

Datseris commented Jul 7, 2018

Things have changed quite a bit, and there is no depwarning for Pkg.dir anymore.

@KristofferC
Copy link
Collaborator

Hm, are you sure. There should be, heh.

@Datseris
Copy link
Contributor

Datseris commented Jul 7, 2018

Oh damn you are right...

julia> using Pkg

julia> Pkg.dir("DynamicalBilliards")
┌ Warning: Pkg.dir is only kept for legacy CI script reasons
└ @ Pkg.API API.jl:432
"C:\\Users\\datseris\\.julia\\v0.6\\DynamicalBilliards\\"

because stuff like Pkg.add were not throwing depwarns, I extrapolated. Sorry!

edit: I was just too greedy and wanted PkgBenchmarks :D

@Datseris
Copy link
Contributor

Datseris commented Aug 5, 2018

With the addition of pathto, can this be resolved now?

JuliaLang/julia#28310

@@ -150,8 +150,8 @@ end
function _runbenchmark_local(file, output, tunefile, retune)
# Loading
include(file)
suite = if isdefined(Main, :SUITE)
Main.SUITE
suite = if @isdefined SUITE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't it better to use Baes.include(Main, file) and stick with isdefined(Main, :SUITE) as before? include(file) pulls user's code into PkgBenchmark namespace, right? The worst case scenario would be that users monkey-patch PkgBenchmark without knowing it.

@platawiec
Copy link

platawiec commented Aug 21, 2018

I'm currently getting:

ERROR: MethodError: no method matching _runbenchmark(::String, ::String, ::BenchmarkConfig, ::Nothing; retune=false, custom_loadpath="")

It seems that tunefile is getting returned as nothing. Not sure if this is particular to my setup. I also noticed a depwarn during precompile on util.jl:25, with a try statement without catch or finally. Incidentally that's also part of the stacktrace for the error above.

Stacktrace:
 [1] uv_error at ./libuv.jl:85 [inlined]
 [2] unlink(::String) at ./file.jl:743
 [3] #rm#9(::Bool, ::Bool, ::Function, ::String) at ./file.jl:253
 [4] #rm at ./none:0 [inlined]
 [5] _withtemp(::getfield(PkgBenchmark, Symbol("##22#26")){Bool,String}, ::String) at /Users/pawel/.julia/packages/PkgBenchmark/LEuLm/src/util.jl:25
 [6] #21 at /Users/pawel/.julia/packages/PkgBenchmark/LEuLm/src/runbenchmark.jl:84 [inlined]
 [7] _with_reqs(::getfield(PkgBenchmark, Symbol("##21#25")){Bool,String}, ::String, ::Function) at /Users/pawel/.julia/packages/PkgBenchmark/LEuLm/src/util.jl:7
 [8] (::getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String})() at /Users/pawel/.julia/packages/PkgBenchmark/LEuLm/src/runbenchmark.jl:83
 [9] (::getfield(PkgBenchmark, Symbol("##52#53")){getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String},String,String})(::LibGit2.GitRepo) at /Users/pawel/.julia/packages/PkgBenchmark/LEuLm/src/util.jl:38
 [10] transact(::getfield(PkgBenchmark, Symbol("##52#53")){getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String},String,String}, ::LibGit2.GitRepo) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/LibGit2/src/LibGit2.jl:958
 [11] _withcommit(::getfield(PkgBenchmark, Symbol("#do_benchmark#24")){Bool,String,String}, ::LibGit2.GitRepo, ::String) at /Users/pawel/.julia/packages/PkgBenchmark/LEuLm/src/util.jl:34
 [12] #benchmarkpkg#20(::Nothing, ::Nothing, ::Bool, ::String, ::Function, ::String, ::String) at /Users/pawel/.julia/packages/PkgBenchmark/LEuLm/src/runbenchmark.jl:105
 [13] (::getfield(PkgBenchmark, Symbol("#kw##benchmarkpkg")))(::NamedTuple{(:retune,),Tuple{Bool}}, ::typeof(benchmarkpkg), ::String, ::String) at ./none:0
 [14] top-level scope at none:0

@KristofferC
Copy link
Collaborator

I updated this PR a bunch and it seems to work ok. Had to get rid of the custom benchmark dependencies but hopefully, we can get those back as the package manager matures.

Still need to rewrite the tests which are kinda hard for this package.

@Datseris
Copy link
Contributor

ping here, pretty please

@KristofferC
Copy link
Collaborator

Try this PR out and see if it works and give some feedback.

@Datseris
Copy link
Contributor

I can't due to #67 . Let's hope someone else does it :)

@Roger-luo
Copy link

@KristofferC So this PR works besides the tests?

@KristofferC
Copy link
Collaborator

It should, I tried it locally a bit before pushing the latest commit

@Roger-luo
Copy link

@KristofferC tried locally with Yao.jl, looks like working, but why CI is broken? need new tests?

@davidanthoff
Copy link
Contributor

Maybe this PR could be merged to master for now, just to make it easier for folks to use this on 1.0? That way one could get this version simply with ]add PkgBenchmark#master. And then the test failures could be fixed by subsequent PRs?

@Datseris
Copy link
Contributor

Datseris commented Oct 10, 2018

yes please. This has been too long already (we have also tested the branch with DynamicalBilliards)

@KristofferC KristofferC merged commit a729c28 into JuliaCI:master Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants