Skip to content

6524: Mark functions that no longer work as deprecated - #7

Merged
porterhyphenborden merged 3 commits into
masterfrom
6524-deprecate-broken-functions
Oct 29, 2026
Merged

porterhyphenborden merged 3 commits into
masterfrom
6524-deprecate-broken-functions

Conversation

@porterhyphenborden

@porterhyphenborden porterhyphenborden commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Deprecates broken functions and updates documentation.

Some functions (search/discover) in this package are broken/calling endpoints that do not exist. The methods of the client HSClient are almost entirely broken as well (does not correctly handle API responses) so have deprecated that entire thing.

To test:

  • Clone this repo
  • git fetch origin
  • git checkout --track origin/6524-deprecate-broken-functions
  • R to start R session
  • In session:
    • install.packages(c("devtools", "remotes"))
    • remotes::install_deps(dependencies = TRUE)
    • devtools::load_all(".")
    • hs_search(text = "test")
    • hs_discover()
    • HSClient$new()

Should see the deprecation warning for these 3 calls.

Screenshot 2026-10-20 at 11 18 05 AM

Note: CI checks are failing with:

Error: This request has been automatically failed because it uses a deprecated version of `actions/cache: v2`. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

I am not going to update the actions at this time since we are not planning to develop this currently.

@abnerbog

Copy link
Copy Markdown

@porterhyphenborden I am getting the same errors! See below.

> hs_search(text = "test")
Error in hs_search(text = "test") : Not Found (HTTP 404).
Called from: httr::stop_for_status(request)
> hs_discover()
Error: Argument 'txt' must be a JSON string, URL or file.
Called from: base::stop(..., call. = FALSE)
> HSClient$new()
R6-based client is deprecated.
Use package functions instead.

HSClientR - R6 Client
=======================================
Thanks for using HSClientR! ♥
This R6 client is deprecated.
Prefer package functions like hs_resource() and hs_files()
=======================================
It looks like you haven't authenticated yet...
Please call $authenticate() on this object to get
OAuth2 authentication set up with HydroShare! :)
Warning message:
HSClient is deprecated and no longer supported by this package. It may return errors. Use direct package functions such as hs_resource(), hs_files(), and hs_sysmeta() instead.

@porterhyphenborden

Copy link
Copy Markdown
Contributor Author

@abnerbog Okay thanks for testing! I see the deprecation warning for the client but not the two function calls. It looks like the warning method I was using won't surface if unless have your local lifecycle_verbosity option set a specific way. I've switched to a different method that should always surface.

Can you try again with a clean install? You should now hopefully see this!

> hs_search(text = "test")
Error:
! `hs_search()` was deprecated in HSClientR 0.3.2 and is now defunct.
ℹ The hs_search() method is no longer supported by this client and now raises a deprecation error.
Run `rlang::last_trace()` to see where the error occurred.
> hs_discover()
Error:
! `hs_discover()` was deprecated in HSClientR 0.3.2 and is now defunct.
ℹ The hs_discover() method is no longer supported by this client and now raises a deprecation error.
Run `rlang::last_trace()` to see where the error occurred.

@abnerbog

abnerbog commented Oct 29, 2026 •

Copy link
Copy Markdown

@porterhyphenborden I now see the deprecation messages on my end! Pasting from my console below.

> hs_search(text = "test")
Error:
! `hs_search()` was deprecated in HSClientR 0.3.2 and is now defunct.
ℹ The hs_search() method is no longer supported by this client and now raises a deprecation error.
Run `rlang::last_trace()` to see where the error occurred.
Called from: signal_abort(cnd)
Browse[1]> Q
> hs_discover()
Error:
! `hs_discover()` was deprecated in HSClientR 0.3.2 and is now defunct.
ℹ The hs_discover() method is no longer supported by this client and now raises a deprecation error.
Run `rlang::last_trace()` to see where the error occurred.
Called from: signal_abort(cnd)
Browse[1]> Q
> HSClient$new()
R6-based client is deprecated.
Use package functions instead.

HSClientR - R6 Client
=======================================
Thanks for using HSClientR! ♥
This R6 client is deprecated.
Prefer package functions like hs_resource() and hs_files()
=======================================
It looks like you haven't authenticated yet...
Please call $authenticate() on this object to get
OAuth2 authentication set up with HydroShare! :)
Warning message:
HSClient is deprecated and no longer supported by this package. It may return errors. Use direct package functions such as hs_resource(), hs_files(), and hs_sysmeta() instead. 

@porterhyphenborden

Copy link
Copy Markdown
Contributor Author

Ah great @abnerbog thank you for testing this out!

@porterhyphenborden
porterhyphenborden merged commit d5d8b4d into master Oct 29, 2026
0 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants