Class ParserConfig

    • Constructor Detail

      • ParserConfig

        public ParserConfig()
    • Method Detail

      • getAllowEmptyGlobs

        @Lazy
        public boolean getAllowEmptyGlobs()
      • getBuildFileName

        @Lazy
        public String getBuildFileName()
      • getDefaultIncludes

        @Lazy
        public Iterable<String> getDefaultIncludes()
        A (possibly empty) sequence of paths to files that should be included by default when evaluating a build file.
      • getPackageImplicitIncludes

        @Lazy
        public com.google.common.collect.ImmutableMap<String,​ImplicitInclude> getPackageImplicitIncludes()
      • getEnforceBuckPackageBoundary

        @Lazy
        public boolean getEnforceBuckPackageBoundary()
      • getBuckPackageBoundaryExceptions

        @Lazy
        public com.google.common.collect.ImmutableList<Path> getBuckPackageBoundaryExceptions()
        A list of absolute paths under which buck package boundary checks should not be performed.
      • getReadOnlyPaths

        @Lazy
        public Optional<com.google.common.collect.ImmutableList<Path>> getReadOnlyPaths()
      • getWatchmanQueryTimeoutMs

        @Lazy
        public Optional<Long> getWatchmanQueryTimeoutMs()
      • getWatchCells

        @Lazy
        public boolean getWatchCells()
      • getEnableParallelParsing

        @Lazy
        public boolean getEnableParallelParsing()
      • getNumParsingThreads

        @Lazy
        public int getNumParsingThreads()
      • getBuildFileImportWhitelist

        @Lazy
        public com.google.common.collect.ImmutableList<String> getBuildFileImportWhitelist()
      • getParserPythonInterpreterPath

        @Lazy
        public Optional<String> getParserPythonInterpreterPath()
      • getPythonModuleSearchPath

        @Lazy
        public Optional<String> getPythonModuleSearchPath()
        Returns the module search path PYTHONPATH to set for the parser, as specified by the 'python_path' key of the 'parser' section.
        Returns:
        The PYTHONPATH value or an empty string if not set.
      • isPolyglotParsingEnabled

        @Lazy
        public boolean isPolyglotParsingEnabled()
        Returns:
        boolean flag indicating whether support for parsing build files using non default syntax (currently Python DSL).

        For a list of supported syntax see Syntax.

      • getDefaultBuildFileSyntax

        @Lazy
        public Syntax getDefaultBuildFileSyntax()
        Returns:
        a syntax to assume for build files without explicit build file syntax marker. *

        For a list of supported syntax see Syntax.

      • getImplicitNativeRulesState

        @Lazy
        public ImplicitNativeRulesState getImplicitNativeRulesState()
        Returns:
        whether native build rules are available for users in build files. If not, they are only accessible in extension files under the 'native' object
      • isWarnAboutDeprecatedSyntax

        @Lazy
        public boolean isWarnAboutDeprecatedSyntax()
        Returns:
        whether Buck should warn about deprecated syntax.
      • getSkylarkGlobHandler

        @Lazy
        public ParserConfig.SkylarkGlobHandler getSkylarkGlobHandler()
        Returns:
        the type of the glob handler used by the Skylark parser.
      • getParserTargetThreshold

        @Lazy
        public int getParserTargetThreshold()
        Returns:
        the parser target threshold. When the current targets produced exceed this value, a warning is emitted.
      • getEnableTargetCompatibilityChecks

        @Lazy
        public boolean getEnableTargetCompatibilityChecks()
      • getRequireTargetPlatform

        @Lazy
        public boolean getRequireTargetPlatform()
        When set, requested target node will fail to configure if platform is not specified either per-target with default_target_platform or globally with --target-platforms= command line flag.
      • getTargetPlatformDetectorSpec

        @Lazy
        public String getTargetPlatformDetectorSpec()
      • getTargetPlatforms

        @Lazy
        public Optional<String> getTargetPlatforms()
        Returns:
        a target that points to a platform rule that describes the target platforms. This is used when command-line argument is unspecified. Please do not use this option.
      • getHostPlatform

        @Lazy
        public Optional<String> getHostPlatform()
        Returns:
        a target that points to a platform rule that describes the host platforms. This is used when command-line argument is unspecified. Please do not use this option.
      • getLogPackageBoundaryExceptionViolations

        @Lazy
        public boolean getLogPackageBoundaryExceptionViolations()
      • getPackageBoundaryEnforcementPolicy

        public ParserConfig.PackageBoundaryEnforcement getPackageBoundaryEnforcementPolicy​(Path path)
        Whether the cell is enforcing buck package boundaries for the package at the passed path.
        Parameters:
        path - Path of package (or file in a package) relative to the cell root.
        Returns:
        How to enforce buck package boundaries for path
      • getUserDefinedRulesState

        @Lazy
        public UserDefinedRulesState getUserDefinedRulesState()
        Returns:
        whether to enable user-defined rule in .bzl files and export various symbols (such as rule()) into the evaluation context. This is disabled if RuleAnalysisComputation is also disabled. This is in progress work, and experimental at this time.
      • getEnablePackageFiles

        @Lazy
        public boolean getEnablePackageFiles()
        Returns:
        Whether to enable parsing of PACKAGE files and apply their attributes to nodes.
      • getMissingTargetLevenshteinDistance

        @Lazy
        public int getMissingTargetLevenshteinDistance()