bazelbuild / rules_go

Go rules for Bazel
Apache License 2.0
1.35k stars 635 forks source link

Add a full `fs.FS` implementation to `runfiles` #3969

Open fmeum opened 1 week ago

fmeum commented 1 week ago

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Runfiles instances now implement fs.FS in a platform-agnostic way, regardless of whether they are manifest- or directory-based. This is meant to finally provide a full replacement for runfiles functionality offered by the legacy bazel package.

Which issues(s) does this PR fix?

Fixes #3375 Fixes #3830

Other notes for review

fmeum commented 1 week ago

cc @sluongng

fmeum commented 6 days ago

Thanks, I addressed your comments and am debugging the remaining test failure on Windows.

fmeum commented 6 days ago

The remaining test failure is a very reasonable one: The logic fails to account for runfiles that are linked under a basename that differs from that of the underlying file. This will require some more tweaks.