-
Notifications
You must be signed in to change notification settings - Fork 15
Description
When importing both SimpleTraits and DataFrames, I do not figure out how to deal with
"both DataFrames and SimpleTraits export "Not"; uses of it in module TwPrototypes must be qualified"
Specifically, SimpleTraits somehow inlines unqualified usages of Not
somewhere in the code, which I do not know how to transform to qualified, which causes compiler errors "UndefVarError: Not not defined" -> with stack traces leading into SimpleTraits source code.
e.g.
@ ~/scratch/twutz/julia_cluster_depots/packages/SimpleTraits/l1ZsK/src/SimpleTraits.jl:171 [inlined]
I suggest as a first measure to replace "Not" by "SimpleTraits.Not" in all the code of SimpleTraits.
Is it possible to not export Not
from SimpleTraits? Would this break too much depending code - which would need to adapt and qualify their usages of Not
?
Personally, I did not use Not
explicitly yet (but obviously implicitly via macro) in my code.
Activity
mauro3 commentedon Oct 2, 2022
Yes, the
Not
within the macro generated code should should be qualified. Needs fixing.Once that is fixed, you could just be specific with what you use:
That is probably all that you need, without the
Not
.Use qualifed call to `Not` in macro-generated code.
Not
in macro-generated code. #84mauro3 commentedon Oct 2, 2022
If you have time you could try out PR #84.
bgctw commentedon Oct 4, 2022
Thanks for taking this up so quickly.
I was, unfortunately, not able to test the package dependencies on your specific commit. I only got error (using Julia 1.8.1):
bgctw commentedon Oct 4, 2022
Thanks. Yes this works.
In addition to the specific imports, I had to say
import SimpleTraits
to prevent errors in inlined code from SimpleTraits source where SimpleTraits module is used to qualify names.
prevent name conflict on Not
prevent name conflict on Not
mauro3 commentedon Oct 4, 2022
No, better do:
as
import
allows method-addition/overwriting.mauro3 commentedon Aug 6, 2025
Fixed with #97