Closed LilithHafner closed 10 months ago
Merging #805 (d74c2f3) into master (c59d116) will increase coverage by
0.41%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #805 +/- ##
==========================================
+ Coverage 92.72% 93.13% +0.41%
==========================================
Files 2 2
Lines 316 335 +19
==========================================
+ Hits 293 312 +19
Misses 23 23
Files Changed | Coverage Δ | |
---|---|---|
src/Compat.jl | 93.22% <ø> (ø) |
|
src/compatmacro.jl | 92.50% <100.00%> (+6.78%) |
:arrow_up: |
Can I propose @compat public foo, bar
?
Is @compat
already used or would this be the only non-deprecated use of the @compat
macro?
It used to be used for all these kind of things in the past, and it is still there: https://github.com/JuliaLang/Compat.jl/blob/c59d116e7039db494ac61548a52651f3d8ba7b30/src/compatmacro.jl#L26
IIUC @compat
was used for syntax changes in the pre-1.0 erra, and was rendered a no-op when Compat.jl dropped support for pre-1.0 code? If that history is correct, then @compat public foo, bar
seems appropriate.
But that was because Compat.jl dropped support for pre Julia 1.0, no? Then there was no point in having all the old syntax transformations.
@fredrikekre, I think we are in agreement. I also prefer your proposed syntax. We should probably wait at least a day or so to let other folks chime in, though.
This does not seem to allow macros:
julia> @compat public fun, @mac
ERROR: LoadError: ArgumentError: cannot mark `(fun, #= REPL[15]:1 =# @mac())` as public. Try `@compat public foo, bar`.
Should this be backported to 3.x?
Should this be backported to 3.x?
I would be in favor of this. There are many packages out there that support julia versions older than 1.6 and are thus unable to depend on Compat 4.
Personally, I would really like to use @public
via a Compat-compatible way in Aqua.
The documentation included in this PR should make the PR itself self-explanatory. If it's not self-explanatory, then it's not acceptably documented.