__precompile__() on the main module and the extensions#96
__precompile__() on the main module and the extensions#96camilodlt wants to merge 3 commits intomaltezfaria:mainfrom
Conversation
|
Thanks for the PR! It would be great to make DataFlowTasks pre-compilation friendly. Any idea why the CI is failing on 1.11? The error is ERROR: LoadError: InitError: MethodError: Cannot `convert` an object of type Nothing to an object of type String
The function `convert` exists, but no method is defined for this combination of argument types. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
- Coverage 86.68% 81.85% -4.83%
==========================================
Files 9 9
Lines 676 678 +2
==========================================
- Hits 586 555 -31
- Misses 90 123 +33 ☔ View full report in Codecov by Sentry. |
|
Hello again, so it failed on 1.6.7 because global constants can not be typed on that version and it failed on 1.11 because we can not use To solve it, I made a static check on the version and define a typed or untyped global constant accordingly. I left PROJECT_ROOT as a ref however. I removed the In my computer it passes tests on 1.6.7, 1.10.5, and 1.11.3 |
|
Thanks for the fixes, the tests now pass! I am trying to understand something rather basic here (have not played much with precompilation). IIUC, |
|
I think that it turns out that I was using DataFlowTasks 0.1.0 in which there is a method overwrite, which prevents precompilation and I thought that a |
What dependencies are preventing the upgrade? Maybe DataFlowTasks is actually compatible with older versions of the packages listed in the |
|
I was able to update to 0.2.0 in my project by calling |
If for some reason you had a Should we close this? |
|
I think the problem is that in my project I had Makie v0.22.1 which is not accepted in your compat which is checked even if I don't use the extras. Adding the specific version works by downgrading Makie, GLMakie in my case. |
Hello :),
I use DataFlowTasks.jl in one of my packages and I need to precompile it, however, I can't precompile it if it uses a package that has precompile(false) like the current version of DataFlowTasks.jl
I think I put all the code that is needed for making the precompilation work. I changed the
PROJECT_ROOTglobal to a constantRef{String}that is updated when the package is init.I made a "hidden" method
_get_dataflowtasks_rootwhich just returns the value of the ref. I use that method everywhere wherePROJECT_ROOTwas used.I ran all the tests on my computer and got all green.
I tested them on my machine which has the following
versioninfo()and was able to precompile it: