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

Don't eval into the module during precompilation #6

Merged
merged 2 commits into from
Jan 27, 2021
Merged

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Jan 27, 2021

This avoids evaluating the symbols from MNE while Julia is precompiling. Seems to fix #4. Closes #5.

@ararslan ararslan requested review from palday and kolia January 27, 2021 18:27
@ararslan
Copy link
Member Author

ararslan commented Jan 27, 2021

$ tree
.
├── Project.toml
└── src
    └── Thingo.jl

1 directory, 2 files
$ cat src/Thingo.jl 
module Thingo

using PyMNE

end
$ julia --project=.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0-beta1 (2021-01-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(Thingo) pkg> add PyMNE#aa/precomp
     Cloning git-repo `https://github.com/beacon-biosignals/PyMNE.jl.git`
    Updating git-repo `https://github.com/beacon-biosignals/PyMNE.jl.git`
    Updating registry at `~/.julia/registries/Beacon`
    Updating git-repo `https://github.com/beacon-biosignals/BeaconRegistry.git`
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
Updating `~/Projects/test/Project.toml`
  [6c5003b2] + PyMNE v0.1.0 `https://github.com/beacon-biosignals/PyMNE.jl.git#aa/precomp`
Updating `~/Projects/test/Manifest.toml`
  [8f4d0f93] + Conda v1.5.0
  [682c06a0] + JSON v0.21.1
  [1914dd2f] + MacroTools v0.5.6
  [69de0a69] + Parsers v1.0.15
  [438e738f] + PyCall v1.92.2
  [6c5003b2] + PyMNE v0.1.0 `https://github.com/beacon-biosignals/PyMNE.jl.git#aa/precomp`
  [81def892] + VersionParsing v1.2.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [de0858da] + Printf
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [4ec0a83e] + Unicode
    Building PyMNE → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/c30e75022fca80ae7adfb5c1eb4a2ff85fde1554/build.log`
  Progress [========================================>]  2/2
2 dependencies successfully precompiled in 4 seconds (6 already precompiled)

julia> using Thingo

julia> Thingo.PyMNE.io.read_raw_edf
PyObject <function read_raw_edf at 0x7fcd974cfbf8>

[ci skip]
@ararslan ararslan merged commit 1e7d47c into main Jan 27, 2021
@ararslan ararslan deleted the aa/precomp branch January 27, 2021 19:12
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.

eval in __init__ breaks downstream precompilation
3 participants