Skip to content
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

Strip trailing slashes in JULIA_DEPOT_PATH when embedding @depot #51892

Merged
merged 1 commit into from
Oct 27, 2023

Commits on Oct 26, 2023

  1. Strip trailing slashes in JULIA_DEPOT_PATH when embedding @depot

    The new relocatable cache file work uses simple text substitution when
    stripping out the depot from a cache file's paths, and when substituting
    it in again over the `@depot` marker.  However, if a user starts julia
    with `JULIA_DEPOT_PATH=/opt/foo/`, the embedded path for `Foo.jl`'s
    includes list will look like `@depotpackages/Foo/XYZ/src/Foo.jl`, and if
    the user then uses `JULIA_DEPOT_PATH=/opt/foo` (which should be
    equivalent) the cache file will fail to load with the message:
    
    ```
    Failed to determine depot from srctext files
    ```
    
    This commit standardizes the serialization format to always contain a
    trailing `pathsep()`, so that textual substitution is more likely to
    work regardless of slightly-inconsistent `JULIA_DEPOT_PATH` settings.
    It also attempts to dodge a few other edge cases by only replacing the
    first instance of `@depot` found.
    staticfloat committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    c37c81d View commit details
    Browse the repository at this point in the history