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

Handle symlinks in go/pkg/tree #188

Closed

Conversation

peterebden
Copy link
Contributor

Currently they are silently turned into file nodes of the contents of whatever they point to.

@googlebot googlebot added the cla: yes The author signed a CLA label Sep 29, 2020
@ola-rozenfeld
Copy link
Contributor

Relevant discussion in #146.

@ola-rozenfeld
Copy link
Contributor

This will need a bit more work before going in:

  • fix tests
  • add new test cases
  • add configuration to Client (Opt) to configure the symlink handling, with current behaviour as the default. Maybe something like:
type DanglingSymlinkResolution int

const (
  DanglingSymlinkResolutionPassThrough DanglingSymlinkResolution = iota
  DanglingSymlinkResolutionIgnore
  DanglingSymlinkResolutionError
)

def SymlinkOpt struct {
  ConvertToFiles bool
  DanglingSymlink DanglingSymlinkResolution
}

We could add more details later, like absolute symlink resolition. This assumes absolute paths will always be converted to files, btw, which I think we should start with (unless BuildGrid supports absolute symlinks?), so the new option will only trigger for relative symlinks.

@peterebden
Copy link
Contributor Author

As discussed in #146 I don't have capacity to do more here at present, @k-ye is kindly looking into the issue.
Will abandon this, happy for others to reuse parts or ignore as they see fit :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes The author signed a CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants