Skip to content

FR: Allow for EACCES when enforceSourceReadsUnderPackageRoots is used #1345

@evancharlton

Description

@evancharlton

A common pattern is to have tools walk up the directory hierarchy and collapse parent configurations. Example packages which do this: eslint, cosmiconfig. However, when enforceSourceReadsUnderPackageRoots is used in BuildXL, this is a bit annoying - it requires that the developer find each package's method to stop traversals (eg, root: true in eslint's config).

These tools generally1 handle EACCES errors well, and use that as a signal to stop traversals. Could BuildXL add support for preventing read access, rather than failing the build?

This is related to an open feature request in the esbuild project: evanw/esbuild#4036 - this tool doesn't provide any way to stop the directory traversal, and instead relies on EACCES errors being thrown.

Footnotes

  1. I have not conducted a thorough audit of the ecosystem; this is just based on my experience and a light skimming of the source code of several packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions