Skip to content

loadRegistry assigns exported objects into the global namespace #304

Open

Description

@sebffischer

This is not documented in loadRegistry.
But as @berndbischl noted, it is documented in batchExport.

library(batchtools)
path = tempfile()
reg = makeExperimentRegistry(path)
#> No readable configuration file found
#> Created registry in '/var/folders/ft/n79895td0xn0gpr6ny8jyh800000gn/T/RtmpAFvW7R/file8eef2b73136b' using cluster functions 'Interactive'

batchExport(list(a = 123))
#> Exporting new objects: 'a' ...


a = 345

loadRegistry(path)
#> Reading registry in read-only mode.You can inspect results and errors, but cannot add, remove, submit or alter jobs in any way.If you need write-access, re-load the registry with `loadRegistry([...], writeable = TRUE)`.
#> No readable configuration file found
#> Experiment Registry
#>   Backend   : Interactive
#>   File dir  : /var/folders/ft/n79895td0xn0gpr6ny8jyh800000gn/T/RtmpAFvW7R/file8eef2b73136b
#>   Work dir  : /private/var/folders/ft/n79895td0xn0gpr6ny8jyh800000gn/T/RtmpJ9OtV1/reprex-8e786d06a68d-frail-tick
#>   Jobs      : 0
#>   Problems  : 0
#>   Algorithms: 0
#>   Seed      : 3916
#>   Writeable : FALSE

a
#> [1] 123

Created on 2024-12-02 with reprex v2.1.1

Activity

  1. sebffischer commented on Dec 2, 2024

    @sebffischer
    SponsorMemberAuthor

    I would even argue that it would be more intuitive to not do this at all, at least by default.

  2. added
    compatBackwards compatibility
    docsDocumentation, vignettes and templates
    good first issueSmall, self-contained, good entry point for new contributors
    on Sep 30, 2026
  3. reopened this on Oct 1, 2026
  4. jemus42 commented on Oct 1, 2026

    @jemus42
    SponsorMember

    As mentioned in #334, I think the issue here is that we'd need to decide whether this should happen at all, but at least now it is documented that it does.

  5. removed
    docsDocumentation, vignettes and templates
    good first issueSmall, self-contained, good entry point for new contributors
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatBackwards compatibility

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions