-
Notifications
You must be signed in to change notification settings - Fork 25
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] Provide reference to libtiledbsoma
source via soft-link
#1372
Conversation
R CMD build does the right thing too
This pull request has been linked to Shortcut Story #28874: Examine viability of libtiledbsoma/ soft-link into apis/r/src/ to avoid source download. |
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #1372 +/- ##
===========================================
- Coverage 65.11% 53.49% -11.63%
===========================================
Files 98 68 -30
Lines 7798 5382 -2416
===========================================
- Hits 5078 2879 -2199
+ Misses 2720 2503 -217
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
LGTM -- very elegant solution!
I left one comment about our dependency-updater script
Let me try this locally on my Mac laptop (outside of CI) before approving
Thanks again!
#!/usr/bin/env Rscript | ||
|
||
## version pinning info | ||
tiledb_core_version <- "2.15.2" |
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.
to minimize keystroking on future dependency-upgrade PRs, @gspowley wrote a very nice scripts/update-tiledb-version.py
:
it looks like that script might not update this current script as-is -- ?
updating that script to handle this file might be done on this PR, or on a follow-up PR
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 wondered about that too but I thought the above was better because we only to change once for version and sha1 rather than three times (with largely redundant long URLs):
TileDB-SOMA/apis/r/tools/get_tarballs.R
Lines 8 to 19 in 326d5ea
if (isMac) { | |
if (isX86) { | |
url <- "https://github.com/TileDB-Inc/TileDB/releases/download/2.15.2/tiledb-macos-x86_64-2.15.2-90f30eb.tar.gz" | |
macosver <- "-mmacosx-version-min=10.14" | |
} else { | |
url <- "https://github.com/TileDB-Inc/TileDB/releases/download/2.15.2/tiledb-macos-arm64-2.15.2-90f30eb.tar.gz" | |
} | |
} else if (isLinux) { | |
url <- "https://github.com/TileDB-Inc/TileDB/releases/download/2.15.2/tiledb-linux-x86_64-2.15.2-90f30eb.tar.gz" | |
} else { | |
stop("Unsupported platform for downloading artifacts. Please have TileDB Core installed locally.") | |
} |
Easy enough to revert if that is what we prefer. In tiledb-r I actually update two-line text 'key: value' text file that is then read (via a DCF reader R has in base so no need to worry about jaml or json...):
@@ -0,0 +1 @@ | |||
../../../libtiledbsoma/ |
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.
✨
Let me know tomorrow or Sunday how it went. My score is pretty bright green at this point:
|
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.
Looks good on personal non-CI mac which is the last bit of ☘️ IMO :D
Issue and/or context:
The R package in
apis/r
needs thelibtiledbsoma
library. Current package practice, when a build is required as no system installation is found is to bring the source in 'externally'. Using a soft-link back to the library source was considered at some point but discarded as it seemed unclear howgit
,R
(esp when build the 'release' tarball) and different file systems would react.It turns out that those fears were unfounded. Using a soft-link (even to a directory) works just fine in recent
git
, andR CMD build
transparently follows the link and includes the sources as a backup. This also works at r-universe per initial tests.This is an improved approach as it ties the usage of the library closer to the provision and minimises risk of slippage.
Changes:
As before, when a system library is seen no build is needed. If a build is needed, it is made with the source which are either included in the tar.gz or accessible when the repo is checked (as in the case of CI at GH Actions). The download step is skipped which allowed for a minor refactoring of the
configure
script which is again the only place from whichsrc/Makevars
is constructed. An extra wrinkle of testing for an 'out of $PATH'cmake
was added as needed at CRAN in case we ever upload (and/or this setup serves as model for other uses).Notes for Reviewer:
SC 28874