-
Notifications
You must be signed in to change notification settings - Fork 990
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
Removing the export of masks for .
and j
#6198
Conversation
Generated via commit 675865c Download link for the artifact containing the test results: ↓ atime-results.zip Time taken to finish the standard R installation steps: 11 minutes and 49 seconds Time taken to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add a TODO about reverting this later as a reminder in the codebase, and write something in the NEWS about the intention to later export . and J
Co-authored-by: Michael Chirico <[email protected]>
@@ -2186,7 +2186,7 @@ if (ncol(DT)==2L) setnames(DT,c("A","B")) # else don't stop under torture with s | |||
test(714, DT[,z:=6:10], data.table(A=1:5,B=5,z=6:10)) | |||
|
|||
# Test J alias is now removed outside DT[...] from v1.8.7 (to resolve rJava::J conflict) | |||
test(715, J(a=1:3,b=4), error="J() called outside of [.data.table. J() is only intended for use in i.") | |||
test(715, J(a=1:3,b=4), error=base_messages$missing_function("J")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test(715, J(a=1:3,b=4), error=base_messages$missing_function("J")) | |
test(715, J(a=1:3,b=4), error=base_messages$missing_function("J")) | |
# future: | |
# test(715, J(a=1:3,b=4), error="J() called outside of [.data.table. J() is only intended for use in i.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will cause an error because we aren't exporting J
Test 715 didn't produce the correct error:
Expected: J() called outside of [.data.table. J() is only intended for use in i.
Observed: could not find function "J"
so i added j
to list where internal-only non exposed functions are imported
haszlib = data.table:::haszlib
J = data.table:::J
is this better or just not changing error ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I think you misread the suggested edit -- in mine the "new" test is commented out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I think you misread the suggested edit -- in mine the "new" test is commented out.
oh i am sorry , i didn't notice 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, plz check it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how this passed, but test 715 is now failing locally on my system and I think it should have failed in our CI too.
Since we leave the J
function in line 2773 the behavior should already be the future behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ben-schwen I don't know what's happening but current master branch doesn't seem to be failing test 715 in my local system,
All 11202 tests (last 2264.8) in tests/tests.Rraw completed ok in 14.6s elapsed (14.2s cpu)
Since we leave the J function in line 2773 the behavior should already be the future behavior?
sorry i don't understand much, are you saying that J should be behaving as defined in data.table.R ? we aren't exporting J from our Namespace nor we import it where internal-only non exposed functions are imported in tests.Rraw , so AFAIK i don't think tests.Rraw have access to function j
hence the error error=base_messages$missing_function("J")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ben-schwen are you still facing this issue, plz inform me if I can be of help :)
Co-authored-by: Michael Chirico <[email protected]>
Co-authored-by: Michael Chirico <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
oh, it's failing under cc().
let's comment it out in our namespace.
…On Mon, Jun 24, 2024, 4:05 AM Nitish Jha ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In inst/tests/tests.Rraw
<#6198 (comment)>
:
> @@ -2186,7 +2186,7 @@ if (ncol(DT)==2L) setnames(DT,c("A","B")) # else don't stop under torture with s
test(714, DT[,z:=6:10], data.table(A=1:5,B=5,z=6:10))
# Test J alias is now removed outside DT[...] from v1.8.7 (to resolve rJava::J conflict)
-test(715, J(a=1:3,b=4), error="J() called outside of [.data.table. J() is only intended for use in i.")
+test(715, J(a=1:3,b=4), error=base_messages$missing_function("J"))
Hi @ben-schwen <https://github.com/ben-schwen> are you still facing this
issue, plz inform me if I can be of help :)
—
Reply to this email directly, view it on GitHub
<#6198 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2BA5ITDEMISHT3QGNKNBDZI74O5AVCNFSM6AAAAABJXJZHJGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMZVGQ3DGNZZGQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Isn't export of
Am i missing something here? |
yes, but cc() is common for data.table development, it in effect attaches
the full data.table namespace, thus unexported functions are also defined &
visible.
…On Mon, Jun 24, 2024, 3:37 PM Nitish Jha ***@***.***> wrote:
oh, it's failing under cc(). let's comment it out in our namespace.
… <#m_5153630067027332990_>
On Mon, Jun 24, 2024, 4:05 AM Nitish Jha *@*.*> wrote: @.** commented on
this pull request. ------------------------------ In inst/tests/tests.Rraw <#6198
(comment)
<#6198 (comment)>>
: > @@ -2186,7 +2186,7 @@ if (ncol(DT)==2L) setnames(DT,c("A","B")) # else
don't stop under torture with s test(714, DT[,z:=6:10],
data.table(A=1:5,B=5,z=6:10)) # Test J alias is now removed outside DT[...]
from v1.8.7 (to resolve rJava::J conflict) -test(715, J(a=1:3,b=4),
error="J() called outside of [.data.table. J() is only intended for use in
i.") +test(715, J(a=1:3,b=4), error=base_messages$missing_function("J")) Hi
@ben-schwen <https://github.com/ben-schwen> https://github.com/ben-schwen
are you still facing this issue, plz inform me if I can be of help :) —
Reply to this email directly, view it on GitHub <#6198 (comment)
<#6198 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB2BA5ITDEMISHT3QGNKNBDZI74O5AVCNFSM6AAAAABJXJZHJGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMZVGQ3DGNZZGQ
. You are receiving this because you modified the open/close state.Message
ID: *@*.***>
Isn't export of j already commented out in Namespace.
export(.SD,.N,.I,.GRP,.NGRP,.BY,.EACHI, measure, patterns)
# TODO(#6197): Export these.
# export(., J)
Am i missing something here?
—
Reply to this email directly, view it on GitHub
<#6198 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2BA5P5JMXGS45GPIPE363ZJCNRJAVCNFSM6AAAAABJXJZHJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGUZTONRUHA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
also to clarify, I mean to comment out the definition in the .R file (which builds the package namespace), not the NAMESPACE file, which defines package exports (and is already commented out as you said) |
Thanks for explanation :) |
Description
Reverting export of
.
andJ
due to them causing revdep issues.Related issue
#6197