-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[R] Option for $schema$code()
to explicitly use package name
#38033
Comments
$schema$code()
to explicitly use package name$schema$code()
to explicitly use package name
Thanks for the feature request @orgadish. Sounds good to me! Do you want to make a pull request? Happy to help with any bits you need guidance on. |
@thisisnic I've created a PR for this, but have not been able to load the package in my local RStudio. I get the following errors:
(This is after running Any thoughts? |
It might be an issue with our nightly builds. Would you mind confirming which OS you're on? |
I'm on macOS 13.5.2 (22G91)
…On Mon, Oct 9, 2023 at 1:43 AM Nic Crane ***@***.***> wrote:
It might be an issue with our nightly builds. Would you mind confirming
which OS you're on?
—
Reply to this email directly, view it on GitHub
<#38033 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRVMV42IFF6CBZZ5AFS4TDX6O2LVAVCNFSM6AAAAAA5T35BKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGU3TGNZUGM>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
@assignUser Any idea what that error message could be? |
@orgadish We're in the middle of a release (so folks are looking at other things) and also in the middle of refactoring our build system, and so the simplest option in the short term might be to try a source build if that's OK? Could you see if running |
@thisisnic `load_all` is what I was running in the first place to build the
package and test it. Is there something else I should try instead?
…On Wed, Oct 11, 2023 at 3:32 AM Nic Crane ***@***.***> wrote:
@orgadish <https://github.com/orgadish> We're in the middle of a release
(so folks are looking at other things) and also in the middle of
refactoring our build system, and so the simplest option in the short term
might be to try a source build if that's OK? Could you see if running
devtools::load_all() works for you for loading the package? It might
pause a while while it's building the C++ library, but subsequent calls to
devtools::load_all() should be faster.
—
Reply to this email directly, view it on GitHub
<#38033 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRVMV2AMTYEDSXDDNX3QQDX6ZYULANCNFSM6AAAAAA5T35BKM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ah, I see! Would you mind trying the instructions here for manually doing a source build? https://arrow.apache.org/docs/r/articles/developers/setup.html#r-and-c |
I just went through that process and got the same result:
```
unable to load shared object
'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-r/00new/arrow/libs/arrow.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-r/00new/arrow/libs/arrow.so,
0x0006): symbol not found in flat namespace
'__ZN5arrow12ArrayBuilder12AppendScalarERKNS_6ScalarEx'
```
…On Wed, Oct 11, 2023 at 10:04 AM Nic Crane ***@***.***> wrote:
Ah, I see! Would you mind trying the instructions here for manually doing
a source build?
https://arrow.apache.org/docs/r/articles/developers/setup.html#r-and-c
—
Reply to this email directly, view it on GitHub
<#38033 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRVMV36YUNZB5MHKWCLZJDX63GTRANCNFSM6AAAAAA5T35BKM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @orgadish, sorry you've having issues. Could you try the following from an R repl and report back with the complete output? Sys.setenv("ARROW_R_DEV"=TRUE) # This gives us more information
devtools::load_all() |
@amoeba Here is the output using
|
Thanks @orgadish, I'm not totally sure what the issue is there but others may. As a way forward, could you try downloading a pre-compiled version of libarrow and trying to build the R package with that instead? Steps would be:
|
Woohoo, looks like that worked! Note: I had to use Thanks! I'll reach out if I need more help fixing the PR test failures. |
Thanks for giving it a try and glad it worked. |
### Rationale for this change #38033 ### What changes are included in this PR? - ~~Added `get_pkg_ns()` helper.~~ - ~~Added `call_name` private method to `DataType` class to store the string name used in the code call. Refactored `code()` public method to use `call_name`.~~ - Converted all `$code() call(...)` to `$code(namespace = FALSE) call2(..., .ns = if(namespace) "arrow")` in `DataType`, `Schema`, and `DictionaryType`. - Added `code` to `Schema` docstring. - Updated `expect_code_roundtrip` to test roundtrip with and without namespace, and check match/no match for `arrow::` depending on namespace argument. ### Are these changes tested? * All tests pass, including lintr checks. ### Are there any user-facing changes? Yes, user-facing changes, but no breaking changes to any public APIs. * Closes: #38033 Lead-authored-by: orgadish <[email protected]> Co-authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
…ache#38144) ### Rationale for this change apache#38033 ### What changes are included in this PR? - ~~Added `get_pkg_ns()` helper.~~ - ~~Added `call_name` private method to `DataType` class to store the string name used in the code call. Refactored `code()` public method to use `call_name`.~~ - Converted all `$code() call(...)` to `$code(namespace = FALSE) call2(..., .ns = if(namespace) "arrow")` in `DataType`, `Schema`, and `DictionaryType`. - Added `code` to `Schema` docstring. - Updated `expect_code_roundtrip` to test roundtrip with and without namespace, and check match/no match for `arrow::` depending on namespace argument. ### Are these changes tested? * All tests pass, including lintr checks. ### Are there any user-facing changes? Yes, user-facing changes, but no breaking changes to any public APIs. * Closes: apache#38033 Lead-authored-by: orgadish <[email protected]> Co-authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
…ache#38144) ### Rationale for this change apache#38033 ### What changes are included in this PR? - ~~Added `get_pkg_ns()` helper.~~ - ~~Added `call_name` private method to `DataType` class to store the string name used in the code call. Refactored `code()` public method to use `call_name`.~~ - Converted all `$code() call(...)` to `$code(namespace = FALSE) call2(..., .ns = if(namespace) "arrow")` in `DataType`, `Schema`, and `DictionaryType`. - Added `code` to `Schema` docstring. - Updated `expect_code_roundtrip` to test roundtrip with and without namespace, and check match/no match for `arrow::` depending on namespace argument. ### Are these changes tested? * All tests pass, including lintr checks. ### Are there any user-facing changes? Yes, user-facing changes, but no breaking changes to any public APIs. * Closes: apache#38033 Lead-authored-by: orgadish <[email protected]> Co-authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
…ache#38144) ### Rationale for this change apache#38033 ### What changes are included in this PR? - ~~Added `get_pkg_ns()` helper.~~ - ~~Added `call_name` private method to `DataType` class to store the string name used in the code call. Refactored `code()` public method to use `call_name`.~~ - Converted all `$code() call(...)` to `$code(namespace = FALSE) call2(..., .ns = if(namespace) "arrow")` in `DataType`, `Schema`, and `DictionaryType`. - Added `code` to `Schema` docstring. - Updated `expect_code_roundtrip` to test roundtrip with and without namespace, and check match/no match for `arrow::` depending on namespace argument. ### Are these changes tested? * All tests pass, including lintr checks. ### Are there any user-facing changes? Yes, user-facing changes, but no breaking changes to any public APIs. * Closes: apache#38033 Lead-authored-by: orgadish <[email protected]> Co-authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
…ache#38144) ### Rationale for this change apache#38033 ### What changes are included in this PR? - ~~Added `get_pkg_ns()` helper.~~ - ~~Added `call_name` private method to `DataType` class to store the string name used in the code call. Refactored `code()` public method to use `call_name`.~~ - Converted all `$code() call(...)` to `$code(namespace = FALSE) call2(..., .ns = if(namespace) "arrow")` in `DataType`, `Schema`, and `DictionaryType`. - Added `code` to `Schema` docstring. - Updated `expect_code_roundtrip` to test roundtrip with and without namespace, and check match/no match for `arrow::` depending on namespace argument. ### Are these changes tested? * All tests pass, including lintr checks. ### Are there any user-facing changes? Yes, user-facing changes, but no breaking changes to any public APIs. * Closes: apache#38033 Lead-authored-by: orgadish <[email protected]> Co-authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
Describe the enhancement requested
I am using
arrow
to write a package to help others interface with some data I have.As such, I am using
arrow::arrow_table(sample_data)$schema$code()
to get an initial schema, copying it into the package, and then adjusting as necessary. However, in the package, I have to explicitly usearrow::
for each datatype. It would be great if there was an argument, e.g.code(include_package_name=FALSE)
that could be enabled such that the output looks like:instead of
Component(s)
R
The text was updated successfully, but these errors were encountered: