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

[swiftpm] For development, build a local copy of PackageDescription #405

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on May 27, 2021

  1. [swiftpm] For development, build a local copy of PackageDescription

    When developing sourcekit-lsp, it is useful to be able to use a released
    version of the swift toolchain. However, because we are using the latest
    branch version of libSwiftPM, it may be that the PackageDescription
    module packaged with the toolchain is incompatible with that libSwiftPM.
    To prevent that problem, we now build our own copy of PackageDescription
    and using that instead of the toolchain's. That change is made by
    default to allow plain `swift build` and `swift test` invocations to
    work without modification. When building as part of the swift toolchain,
    we continue to use the toolchain's copy of PackageDescription, because
    we know that it is built from the same sources as we are using for
    libSwiftPM.
    
    One situation that is not explicitly covered by the above is if
    sourcekit-lsp is installed somewhere outside of a swift toolchain. In
    that case by default it will try to find a local package description
    module next to the sourcekit-lsp binary, but assuming that fails it will
    fallback to searching the default toolcahin that it discovers at
    runtime, as it does today. If this usecase turns out to be important we
    can provide additional ways to control how to find the
    PackageDescription module.
    
    rdar://78548287
    benlangmuir committed May 27, 2021
    Configuration menu
    Copy the full SHA
    3639f1a View commit details
    Browse the repository at this point in the history