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

Introduce a pure Swift runfiles library #1310

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

cerisier
Copy link

@cerisier cerisier commented Sep 17, 2024

First shot at implementing #890

Main implementation

I followed guidance from @fmeum and based this implementation on the runfiles library of rules_python where applicable since this was pointed as the reference implementation.

In addition to rules_python implementation, this implementation uses a similar mechanism as the C++ implementation for deducing the RUNFILES_DIR and RUNFILES_MANIFEST_FILE location based on argv0.

TODO

  • Implement runfiles directory detection from argv0
  • Discuss the proper way to solve the current repository issue and whether to keep the BazelRunfilesConstants file generation.
  • Fix Linux compat

@cerisier cerisier marked this pull request as ready for review January 4, 2025 09:17
@cerisier cerisier changed the title Introduce a runfiles library Introduce a pure Swift runfiles library Jan 4, 2025
swift/runfiles/README.md Outdated Show resolved Hide resolved
examples/runfiles/main.swift Outdated Show resolved Hide resolved
Co-authored-by: Brentley Jones <[email protected]>
Copy link
Contributor

@luispadron luispadron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great, thank you for all the work on this. Some comments for an initial review

examples/runfiles/BUILD Outdated Show resolved Hide resolved
examples/runfiles/main.swift Outdated Show resolved Hide resolved
swift/runfiles/README.md Outdated Show resolved Hide resolved
swift/runfiles/README.md Outdated Show resolved Hide resolved
swift/runfiles/README.md Show resolved Hide resolved
swift/runfiles/Runfiles.swift Outdated Show resolved Hide resolved
swift/runfiles/Runfiles.swift Outdated Show resolved Hide resolved
swift/runfiles/Runfiles.swift Show resolved Hide resolved
swift/runfiles/Runfiles.swift Outdated Show resolved Hide resolved
swift/runfiles/Runfiles.swift Outdated Show resolved Hide resolved
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.

4 participants