A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.

Overview

logo

Buck

Buck is a build tool. To see what Buck can do for you, check out the documentation at http://buck.build/.

Build Status

Installation

Since Buck is used to build Buck, the initial build process involves 2 phases:

1. Clone the Buck repository and bootstrap it with ant:
git clone --depth 1 https://github.com/facebook/buck.git
cd buck
ant

You must be using Java 8 or 11 for this to compile successfully. If you see compilation errors from ant, check your JAVA_HOME is pointing at one of these versions.

2. Use bootstrapped version of Buck to build Buck:
./bin/buck build --show-output buck
# output will contain something like
# //programs:buck buck-out/gen/programs/buck.pex
buck-out/gen/programs/buck.pex --help
Prebuilt buck binaries

Pre-built binaries of buck for any buck sha can be downloaded from https://jitpack.io/com/github/facebook/buck/<sha>/buck-<sha>.pex. The very first time a version of buck is requested, it is built via jitpack. As a result, it could take a few minutes for this initial binary to become available. Every subsequent request will just serve the built artifact directly. This functionality is available for any fork of buck as well, so you can fetch https://jitpack.io/com/github/<github-user-or-org>/buck/<sha>/buck-<sha>.pex

For buck binaries built for JDK 11, modify end of the url to buck-<sha>-java11.pex.

Feature Deprecation

Buck tries to move fast with respect to its internals. However, for user facing features (build rules, command line interface, etc), the Buck team tries to have a graceful deprecation process. Note that this generally applies only to documented functionality, or functionality that is less documented, but appears to be in wide use. That process is:

  • An issue is opened on Github suggesting what will be deprecated, and when it will be removed. For larger features that are deprecated, there may be a period when the default is the new setting, and the old behavior may only be used with a configuration change.
  • A change is submitted to Buck that puts the old behavior behind a configuration flag and sets the default to the old behavior. These flags can be found at https://buck.build/concept/buckconfig.html#incompatible.
  • For larger features, a change eventually is put in place that sets the default to the new behavior. e.g. when Skylark becomes the default build file parser.
  • When the removal date is reached, a change is submitted to remove the feature. At this point, the configuration value will still parse, but will not be used by Buck internally.

License

Apache License 2.0

Comments
  • Add support for error prone as native compiler option

    Add support for error prone as native compiler option

    Fixes #994.

    Summary: http://errorprone.info is a static analysis tool for Java that catches common programming mistakes at compile-time. With this change it can be permanenty or instantly activated as default compiler. Moreover, java_library rule is extended as well.

    The configuration option: java.error_prone_javac is considered to be experimental and is not documented.

    Test Plan:

    1. Permanently activate error prone: add this line to .buckconfig:
       [java]
         error_prone_javac = true
    
    1. Instantly activate error prone:
      $ buck build --config java.error_prone_javac=true <rule>
    
    1. Activate error prone per rule base:
    java_library(
        name = 'foo',
        error_prone_javac = True,
        [...]
    
    CLA Signed GH Review: needs-revision Import Started 
    opened by davido 90
  • RFC: Introduce build rules for building GWT applications.

    RFC: Introduce build rules for building GWT applications.

    I'm looking into adding build rules for building GWT applications. I'm curious what folks think the arguments to the rules should look like.

    • Do we need a special gwt_library() rule, or can we just use java_library()? My intuition is that if you use JSNI in your Java code, then you need to classify that as a gwt_library().
    • How do you deal with dependencies that have dual implementations: one for the JRE and one for JavaScript? For example, you may have a subgraph of dependencies that transitively depend on Guava. Then at the top, you have a gwt_binary() target and a java_binary() target? How do you ensure that the gwt_binary() pulls in guava-gwt-17.0.jar while the java_binary() pulls in guava-17.0.jar? One option is to have parallel versions of each subgraph, but that seems messy.
    • How can we design gwt_binary() (or this whole system of rules) so that it is easy to run the GWT app in developer mode? Ideally, a developer should not have to run buck build after every code modification in order to reload the GWT app. The existing edit-refresh-test cycle needs to be preserved.
    opened by bolinfest 58
  • [IntelliJ] Handle resources_root in project generation

    [IntelliJ] Handle resources_root in project generation

    IntelliJ project generation right now doesn't generate resource folders for Java code, instead relying directly on the generation of source folders. This results in resources being put in the wrong places if resources_root is different from the Java src_roots option. This change introduces a new type of IjFolder (JavaResourceFolder) which tracks resources_root if it is set and sets the relativeOutputPath of the IntelliJ folders to try and handle this correctly.

    Note that it probably can't be fully handled correctly if there are source files and resource files mixed in the same directories, because IntelliJ's granularity only goes to the directory level, while buck can set them at the file level.

    I'm not entirely sure if this is the best approach to handling this, would appreciate any suggestions

    CLA Signed GH Review: accepted Import Started 
    opened by zhan-xiong 54
  • Filtering platform specific source files

    Filtering platform specific source files

    This PR fixes #1701

    Known issue:

    srcs=['.'] will crash on go_binary rules but not on go_library. The crash happens before GoCompile.getBuildSteps gets called. Temporary workaround is to use srcs=glob(["*.go"]). The filtering still works.

    CLA Signed Import Started 
    opened by linzhp 53
  • Update manifest merger

    Update manifest merger

    This switches to ManifestMerger2 implementation and fixes https://github.com/facebook/buck/issues/299

    Majority of this PR is updating aosp to 25.2.0 version of the tools.

    The only interesting change is in GenerateManifestStep.java.

    For the sake of not maintaining two versions of aosp, this PR replaces old ManifestMerger with ManifestMerger2. Having both is possible (we could take ManifestMerger from tools 24.x.x, the last version that shipped with it) but if the new merger works for everyone, probably best to just go with that.

    CLA Signed GH Review: accepted Import Started 
    opened by marcinkwiatkowski 52
  • Parallelize swift compilation by compiling file individually

    Parallelize swift compilation by compiling file individually

    This PR is one of the effort to rework the incremental build support https://github.com/facebook/buck/pull/907.

    Instead of compiling all swift files in a target in one shot, we create build rule for each of the file so that we can compile them in parallel, therefore speed up the compilation process, especially useful for a target with a lot of swift files.

    CLA Signed GH Review: needs-revision 
    opened by nguyentruongtho 46
  • Cross-cell: Fix file system mismatch in classpath resolution

    Cross-cell: Fix file system mismatch in classpath resolution

    Rule can be provided from different cell and thus output file name must be relocated according to cell root. Change all the methods on JavaLibraryClasspathProvider that take Optional outputJar to take Optional outputJar instead.

    SourcePaths are much safer because they encapsulate the project filesystem. That way we know they can always be resolved correctly.

    Closes #545

    TEST PLAN:

    Clone JGit with this patch: [1]. Clone Gerrit Code Review with this patch: [2]. Replace JGit cell during Gerrit build, with:

    $ buck build --config repositories.jgit=../jgit gerrit

    Observe, that without this diff, the classpath contains invalid entries: non relocated jgit output file. This diff relocates it to jgit cell.

    [1] https://git.eclipse.org/r/61938 [2] https://gerrit-review.googlesource.com/73000

    CLA Signed GH Review: accepted 
    opened by davido 44
  • Decouple proguard application logic from package type

    Decouple proguard application logic from package type

    Decoupling proguard application from the package type as there are cases when one would want to apply proguard on a debug build for debugging purposes with a different configuration than release

    CLA Signed GH Review: accepted Import Started 
    opened by kageiit 43
  • Add support for running tests in IDE from gutter icon

    Add support for running tests in IDE from gutter icon

    This is a diff that contains support to allow users to run tests from icons in the ide.

    See images bellow from the okbuck repo: Running a Test from editor: screen shot 2017-06-30 at 9 24 38 am screen shot 2017-06-30 at 9 24 51 am screen shot 2017-06-30 at 9 25 06 am screen shot 2017-06-30 at 9 25 18 am screen shot 2017-06-30 at 9 25 28 am

    Debugging a Test from editor: screen shot 2017-06-30 at 9 26 30 am screen shot 2017-06-30 at 9 25 48 am screen shot 2017-06-30 at 9 39 30 am screen shot 2017-06-30 at 9 26 43 am screen shot 2017-06-30 at 9 27 21 am

    Editing a test configuration: screen shot 2017-06-30 at 9 27 32 am screen shot 2017-06-30 at 9 27 39 am

    CLA Signed GH Review: accepted Import Started 
    opened by clonetwin26 43
  • Populate Styleable entries correctly in R.java generated by MiniAapt

    Populate Styleable entries correctly in R.java generated by MiniAapt

    • Styleable entries array now contain right int values equal to its correspondding attr values. Android attributes are still given random values since R.java is not available at MergeAndroidResourcesStep for libraries.
    • Set R idValues of a parent library equal to it’s dependent libraries idValue.
    CLA Signed GH Review: accepted Import Started 
    opened by raviagarwal7 43
  • Allow mixed java and kotlin sources in kotlin_library() target.

    Allow mixed java and kotlin sources in kotlin_library() target.

    see comments in #948

    This would have to be a two step process. Run kotlinc on the kotlin sources first, then pass the result into javac and compile the java sources. https://discuss.kotlinlang.org/t/compiling-mixed-java-and-kotlin-files-on-the-command-line/1553

    opened by dsyang 42
  • buck fetch fails with symbolic links in an archive

    buck fetch fails with symbolic links in an archive

    I am trying to add ldap as a dependency using http_archive but buck fails to fetch the library. There is a "broken link" symbolic link in the tests folder which causes buck to fail on sha verification. Is there a way to skip that verification for that specific folder? I am okay to delete that specific folder before verification as well but not sure how.

    http_archive(
      name = 'libopenldap-src',
      urls = ['https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.5.13.tgz'],
      sha256 = 'ee3c430c4ef7b87c57b622108c7339376d6c27fbbf2767770be3de1df63d008c',
      strip_prefix = 'openldap-2.5.13',
      type = 'tar.gz'
    )
    
    buck fetch //...:libopenldap-src
    
    Buck encountered an internal error
    com.facebook.buck.command.Build$BuildExecutionException: com.facebook.buck.core.exceptions.BuckUncheckedExecutionException: When finalizing rule.: java.lang.RuntimeException: java.io.IOException: Error computing Sha1 for /Users/yasinh/Desktop/DDDCore/buck-out/gen/libraries/3rdparty/libopenldap/libopenldap-src/libopenldap-src/tests/data/homedir/skel/directory/broken link: /Users/yasinh/Desktop/DDDCore/buck-out/gen/libraries/3rdparty/libopenldap/libopenldap-src/libopenldap-src/tests/data/homedir/skel/directory/broken link
    	at com.facebook.buck.command.Build.waitForBuildToFinish(Build.java:297)
    	at com.facebook.buck.command.Build.waitForBuildToFinishAndPrintFailuresToEventBus(Build.java:394)
    	at com.facebook.buck.command.Build.executeAndPrintFailuresToEventBus(Build.java:136)
    	at com.facebook.buck.cli.FetchCommand.runWithoutHelp(FetchCommand.java:174)
    	at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:281)
    	at com.facebook.buck.cli.AbstractContainerCommand.run(AbstractContainerCommand.java:90)
    	at com.facebook.buck.cli.MainRunner.runMainWithExitCode(MainRunner.java:1448)
    	at com.facebook.buck.cli.MainRunner.runMainThenExit(MainRunner.java:476)
    	at com.facebook.buck.cli.MainWithNailgun.nailMain(MainWithNailgun.java:77)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at com.facebook.nailgun.NGSession.runImpl(NGSession.java:313)
    	at com.facebook.nailgun.NGSession.run(NGSession.java:199)
    
    opened by yasinhin 1
  • Unable to create abi jar

    Unable to create abi jar

    Does anyone knows how to resolve it? I'm using buck remote download it, but it has these errors.

    Unable to create abi jar from /home/mars/mars/buck-out/gen/lib/junixsocket-native-common-2.5.2.jar/junixsocket-native-common-2.5.2.jar. Falling back to hashing that jar
    Unable to create abi jar from /home/mars/mars/buck-out/gen/lib/junixsocket-native-common-2.5.2.jar/junixsocket-native-common-2.5.2.jar. Falling back to hashing that jar
    Unable to create abi jar from /home/mars/mars/buck-out/gen/lib/junixsocket-common-2.5.2.jar/junixsocket-common-2.5.2.jar. Falling back to hashing that jar
    Unable to create abi jar from /home/mars/mars/buck-out/gen/lib/junixsocket-common-2.5.2.jar/junixsocket-common-2.5.2.jar. Falling back to hashing that jar
    

    Thanks.

    opened by EvenChang 0
  • Windows,When building rule //src/com/facebook/buck/jvm/java/abi/kotlin:kotlin.

    Windows,When building rule //src/com/facebook/buck/jvm/java/abi/kotlin:kotlin.

    I have read #2466. They solved the problem by brew in mac os. Can I install buck without Chocolatey in windows os?

    I run command in git bash.And same results in cmd .

    $ java -version java version "1.8.0_341" Java(TM) SE Runtime Environment (build 1.8.0_341-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)

    windows10 professional

    $ ant -version Apache Ant(TM) version 1.10.12 compiled on October 13 2021

    $ python -V Python 2.7.18

    $ python3 -V Python 3.7.2

    $ git -v git version 2.37.3.windows.1

    $ watchman -v 20220828.225657.0

    $ bin/buck build --show-output buck -v 10 some error log: …… rm -f -r buck-out\annotation\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin_kotlin_gen_ mkdir -p buck-out\annotation\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin_kotlin_gen_ javac -source 8 -target 8 -sourcepath -g -bootclasspath D:\tmp\buck\third-party\java\jdk\jdk8-rt-stub.jar -proc:none -verbose -d D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes -classpath D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-analysis_\asm-analysis-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-commons_\asm-commons-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-jar_\asm-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-tree_\asm-tree-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-util_\asm-util-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\jsr_jsr305_\jsr305.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlinx-metadata-jvm_kotlinx-metadata-jvm_\kotlinx-metadata-jvm-0.1.0.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlin_kotlin-stdlib_\kotlin-stdlib.jar @buck-out\gen\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin__kotlin__srcs [2022-09-03 10:23:05.942][warn ][command:81ff55d1-7be9-4de3-b117-34a1b0f42130][tid:133][com.facebook.buck.core.build.engine.impl.CachingBuildRuleBuilder] Building rule [//src/com/facebook/buck/jvm/java/abi/kotlin:kotlin] failed. com.facebook.buck.core.build.engine.impl.BuildRuleFailedException: com.facebook.buck.step.StepFailedException: Command failed with exit code 1.

    stderr: When running <javac -source 8 -target 8 -sourcepath -g -bootclasspath D:\tmp\buck\third-party\java\jdk\jdk8-rt-stub.jar -proc:none -verbose -d D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes -classpath D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-analysis_\asm-analysis-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-commons_\asm-commons-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-jar_\asm-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-tree_\asm-tree-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-util_\asm-util-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\jsr_jsr305_\jsr305.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlinx-metadata-jvm_kotlinx-metadata-jvm_\kotlinx-metadata-jvm-0.1.0.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlin_kotlin-stdlib_\kotlin-stdlib.jar @buck-out\gen\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin__kotlin__srcs>. at com.facebook.buck.core.build.engine.impl.CachingBuildRuleBuilder.getFailedException(CachingBuildRuleBuilder.java:1207) at com.facebook.buck.core.build.engine.impl.CachingBuildRuleBuilder.lambda$4(CachingBuildRuleBuilder.java:378) at com.google.common.util.concurrent.AbstractCatchingFuture$AsyncCatchingFuture.doFallback(AbstractCatchingFuture.java:172) at com.google.common.util.concurrent.AbstractCatchingFuture$AsyncCatchingFuture.doFallback(AbstractCatchingFuture.java:159) at com.google.common.util.concurrent.AbstractCatchingFuture.run(AbstractCatchingFuture.java:112) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1016) at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:867) at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:713) at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:97) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1016) at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:867) at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:713) at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:97) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1016) at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:867) at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:713) at com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:54) at com.facebook.buck.core.build.engine.impl.CachingBuildRuleBuilder$BuildRuleSteps.runWithDefaultExecutor(CachingBuildRuleBuilder.java:1405) at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$2(WeightedListeningExecutorService.java:100) at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$0(WeightedListeningExecutorService.java:74) at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:206) at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:195) at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:115) at com.google.common.util.concurrent.MoreExecutors$5$1.run(MoreExecutors.java:999) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: com.facebook.buck.step.StepFailedException: Command failed with exit code 1.

    stderr: When running <javac -source 8 -target 8 -sourcepath -g -bootclasspath D:\tmp\buck\third-party\java\jdk\jdk8-rt-stub.jar -proc:none -verbose -d D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes -classpath D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-analysis_\asm-analysis-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-commons_\asm-commons-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-jar_\asm-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-tree_\asm-tree-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-util_\asm-util-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\jsr_jsr305_\jsr305.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlinx-metadata-jvm_kotlinx-metadata-jvm_\kotlinx-metadata-jvm-0.1.0.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlin_kotlin-stdlib_\kotlin-stdlib.jar @buck-out\gen\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin__kotlin__srcs>. at com.facebook.buck.step.StepFailedException.createForFailingStepWithExitCode(StepFailedException.java:78) at com.facebook.buck.step.StepRunner.runStep(StepRunner.java:67) at com.facebook.buck.core.build.engine.impl.CachingBuildRuleBuilder$BuildRuleSteps.executeCommands(CachingBuildRuleBuilder.java:1417) at com.facebook.buck.core.build.engine.impl.CachingBuildRuleBuilder$BuildRuleSteps.runWithDefaultExecutor(CachingBuildRuleBuilder.java:1394) ... 9 more Caused by: com.facebook.buck.core.exceptions.HumanReadableException: Command failed with exit code 1.

    stderr: at com.facebook.buck.step.StepFailedException.createForFailingStepWithExitCode(StepFailedException.java:82) ... 12 more

    ……

    I run this in cmd: javac -source 8 -target 8 -sourcepath -g -bootclasspath D:\tmp\buck\third-party\java\jdk\jdk8-rt-stub.jar -proc:none -verbose -d D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes -classpath D:\tmp\buck\buck-out\bin\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin\lib__kotlin__scratch\classes;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-analysis_\asm-analysis-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-commons_\asm-commons-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-jar_\asm-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-tree_\asm-tree-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\asm_asm-util_\asm-util-7.1.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\jsr_jsr305_\jsr305.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlinx-metadata-jvm_kotlinx-metadata-jvm_\kotlinx-metadata-jvm-0.1.0.jar;D:\tmp\buck\buck-out\gen\ce9b6f2e\third-party\java\kotlin_kotlin-stdlib_\kotlin-stdlib.jar @buck-out\gen\ce9b6f2e\src\com\facebook\buck\jvm\java\abi\kotlin__kotlin__srcs

    error is :Can't find source file but : $ ls buck-out/gen/ce9b6f2e/src/com/facebook/buck/jvm/java/abi/kotlin/__kotlin__srcs -l -rw-r--r-- 1 hp 197121 0 Sep 3 10:23 buck-out/gen/ce9b6f2e/src/com/facebook/buck/jvm/java/abi/kotlin/__kotlin__srcs

    opened by noizz 0
  • Unable to build buck. Java class file version error.

    Unable to build buck. Java class file version error.

    Description

    I've cloned the repo but I'm unable to build buck. There was an identical issue: #2355 which got closed.

    Steps to reproduce

    • Clone the repo and build with ant:
    $ git clone --depth 1 https://github.com/facebook/buck.git
    $ cd buck
    $ ant
    
    • Fails when executing the ./bin/buck build --show-output buck command with the following:
    Buck encountered an internal error
    com.google.common.util.concurrent.ExecutionError: java.lang.UnsupportedClassVersionError: com/facebook/buck/remoteexecution/proto/RESessionID has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 55.0
    	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2216)
    	at com.google.common.cache.LocalCache.get(LocalCache.java:4147)
    	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)
    	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)
    	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5146)
    	at com.facebook.buck.core.config.ConfigViewCache.getView(ConfigViewCache.java:46)
    	at com.facebook.buck.core.config.BuckConfig.getView(BuckConfig.java:101)
    	at com.facebook.buck.cli.MainRunner.isRemoteExecutionAutoEnabled(MainRunner.java:1785)
    	at com.facebook.buck.cli.MainRunner.isRemoteExecutionBuild(MainRunner.java:1796)
    	at com.facebook.buck.cli.MainRunner.runMainWithExitCode(MainRunner.java:762)
    	at com.facebook.buck.cli.MainRunner.runMainThenExit(MainRunner.java:476)
    	at com.facebook.buck.cli.MainWithNailgun.nailMain(MainWithNailgun.java:77)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    	at com.facebook.nailgun.NGSession.runImpl(NGSession.java:313)
    	at com.facebook.nailgun.NGSession.run(NGSession.java:199)
    Caused by: java.lang.UnsupportedClassVersionError: com/facebook/buck/remoteexecution/proto/RESessionID has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 55.0
    	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
    	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
    	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
    	at java.base/java.security.AccessController.doPrivileged(Native Method)
    	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
    	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
    	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
    	at java.base/java.lang.Class.getMethodsRecursive(Class.java:3307)
    	at java.base/java.lang.Class.getMethod0(Class.java:3293)
    	at java.base/java.lang.Class.getMethod(Class.java:2106)
    	at com.facebook.buck.core.config.ConfigViewCache$ConfigViewCacheLoader.load(ConfigViewCache.java:67)
    	at com.facebook.buck.core.config.ConfigViewCache$ConfigViewCacheLoader.load(ConfigViewCache.java:1)
    	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708)
    	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416)
    	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299)
    	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)
    	... 17 more
    

    I've tried compiling with java 8, 11 and 18... 8 and 11 pass, although when trying to build buck with java 8 it says:

    • Warning: JAVA_HOME is set to "/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home", which looks like a Java 8 path, but Buck requires Java 11. Ignoring JAVA_HOME. Set BUCK_RESPECT_JAVA_HOME to 1 to disable this behavior.

    ant command fails when using java 18 with the following:

    compile:
        [javac] Compiling 1 source file to /Users/ljd1bg/Desktop/buck/ant-out/classes
        [javac] [compiled 86 lines in 343 ms: 250.7 lines/s]
        [javac] ----------
        [javac] 1. ERROR in /Users/ljd1bg/Desktop/buck/src/com/facebook/buck/jvm/java/abi/java11/SourceVersionUtils.java (at line 27)
        [javac] 	switch (version) {
        [javac] 	        ^^^^^^^
        [javac] The enum constant RELEASE_12 should have a corresponding case label in this enum switch on SourceVersion. To suppress this problem, add a comment //$CASES-OMITTED$ on the line above the 'default:'
        [javac] ----------
        [javac] 2. ERROR in /Users/ljd1bg/Desktop/buck/src/com/facebook/buck/jvm/java/abi/java11/SourceVersionUtils.java (at line 27)
        [javac] 	switch (version) {
        [javac] 	        ^^^^^^^
        [javac] The enum constant RELEASE_13 should have a corresponding case label in this enum switch on SourceVersion. To suppress this problem, add a comment //$CASES-OMITTED$ on the line above the 'default:'
        [javac] ----------
        [javac] 3. ERROR in /Users/ljd1bg/Desktop/buck/src/com/facebook/buck/jvm/java/abi/java11/SourceVersionUtils.java (at line 27)
        [javac] 	switch (version) {
        [javac] 	        ^^^^^^^
        [javac] The enum constant RELEASE_14 should have a corresponding case label in this enum switch on SourceVersion. To suppress this problem, add a comment //$CASES-OMITTED$ on the line above the 'default:'
        [javac] ----------
        [javac] 4. ERROR in /Users/ljd1bg/Desktop/buck/src/com/facebook/buck/jvm/java/abi/java11/SourceVersionUtils.java (at line 27)
        [javac] 	switch (version) {
        [javac] 	        ^^^^^^^
        [javac] The enum constant RELEASE_15 should have a corresponding case label in this enum switch on SourceVersion. To suppress this problem, add a comment //$CASES-OMITTED$ on the line above the 'default:'
        [javac] ----------
        [javac] 5. ERROR in /Users/ljd1bg/Desktop/buck/src/com/facebook/buck/jvm/java/abi/java11/SourceVersionUtils.java (at line 27)
        [javac] 	switch (version) {
        [javac] 	        ^^^^^^^
        [javac] The enum constant RELEASE_16 should have a corresponding case label in this enum switch on SourceVersion. To suppress this problem, add a comment //$CASES-OMITTED$ on the line above the 'default:'
        [javac] ----------
        [javac] 6. ERROR in /Users/ljd1bg/Desktop/buck/src/com/facebook/buck/jvm/java/abi/java11/SourceVersionUtils.java (at line 27)
        [javac] 	switch (version) {
        [javac] 	        ^^^^^^^
        [javac] The enum constant RELEASE_17 should have a corresponding case label in this enum switch on SourceVersion. To suppress this problem, add a comment //$CASES-OMITTED$ on the line above the 'default:'
        [javac] ----------
        [javac] 7. ERROR in /Users/ljd1bg/Desktop/buck/src/com/facebook/buck/jvm/java/abi/java11/SourceVersionUtils.java (at line 27)
        [javac] 	switch (version) {
        [javac] 	        ^^^^^^^
        [javac] The enum constant RELEASE_18 should have a corresponding case label in this enum switch on SourceVersion. To suppress this problem, add a comment //$CASES-OMITTED$ on the line above the 'default:'
        [javac] ----------
        [javac] 7 problems (7 errors)
    
    BUILD FAILED
    /Users/ljd1bg/Desktop/buck/build.xml:613: The following error occurred while executing this line:
    /Users/ljd1bg/Desktop/buck/build.xml:555: Compile failed; see the compiler error output for details.
    
    Total time: 4 seconds
    

    Java Version

    java -version                                                                                                                                                                                                          
        java version "11.0.16.1" 2022-08-18 LTS
        Java(TM) SE Runtime Environment 18.9 (build 11.0.16.1+1-LTS-1)
        Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.16.1+1-LTS-1, mixed mode)
    
    javac -version
        javac 11.0.16.1
    
    opened by ljubinkovicdj93 1
  • Create buck_tool.py

    Create buck_tool.py

    Setting argv[0] to "buck" on Windows violates the normal convention where argv[0] should be the application name. This might convenient for finding buck-related tasks in process-explorer but it comes with the drawback of making argv[0] not reliable for process identification

    opened by EdTice 1
  • Update sqlite to include ability to build buck on M1 chips. Currently, BUCK fails because sqlite-jdbc-3.20.0 doesn't support aarch64 but 3.39.2.0 does.

    Update sqlite to include ability to build buck on M1 chips. Currently, BUCK fails because sqlite-jdbc-3.20.0 doesn't support aarch64 but 3.39.2.0 does.

    Update sqlite to include ability to build buck on M1 chips. Currently, BUCK fails because sqlite-jdbc-3.20.0 doesn't support aarch64 but 3.39.2.0 does.

    CLA Signed 
    opened by Solace-Studios 3
Releases(v2022.05.05.01)
Owner
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
Facebook
Adaptable, fast automation for all

Gradle is a build tool with a focus on build automation and support for multi-language development. If you are building, testing, publishing, and depl

Gradle 14.2k Jan 8, 2023
Packages your JAR, assets and a JVM for distribution on Windows, Linux and Mac OS X

About Packages your JAR, assets and a JVM for distribution on Windows, Linux and macOS, adding a native executable file to make it appear like a nativ

libgdx 2.4k Jan 5, 2023
Dead-Simple Packaging and Deployment for JVM Apps

Capsule Dead-Simple Packaging and Deployment for JVM Applications Capsule is a packaging and deployment tool for JVM applications. A capsule is a sing

Parallel Universe 1.1k Sep 16, 2022
Documentation and issues of https://jitpack.io

JitPack.io JitPack is a novel package repository for JVM and Android projects. It builds Git projects on demand and provides you with ready-to-use art

JitPack 2.3k Dec 27, 2022
XManager-Spotify - An android application where you can manage and install all versions of the spotify app.

For contributors, pull request should be done on the "Developer" branch. The "main" branch is for the release. IMPORTANT NOTES (READ ME FIRST) •xManag

xManager (Spotify) 3.7k Jan 3, 2023
Spigot plugin featuring a wide variety of features for a server based on modules.

CTSNC, standing for Custom Chat, Tablist, Scoreboard, NameTag & Chat, is a all-round solution based on multiple modules each featuring a dedicated function while CTSNC acts as the core. Here all configuration files are housed for easy management and customization.

null 2 Dec 30, 2022
A small client useful for a variety of tasks ranging from raiding to duping.

CornClient A small utility mod for Minecraft useful for a variety of tasks ranging from raiding to duping. Support You can open an issue for help or f

Arilius Collection 115 Jan 4, 2022
Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon

Stfalcon Fixturer A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can

Stfalcon LLC 31 Nov 29, 2021
Welcome 🙌! This repository encourages daily contributions from anyone intending to learn Data Structures and Algorithms every day

?? DSA-Community Welcome ?? ! This repository encourages daily contributions from anyone intending to learn Data Structures and Algorithms consistentl

Bishal Mohari 4 Sep 9, 2022
Design Patterns: Elements of Reusable Object-Oriented Software

GoF Design Patterns Design Patterns: Elements of Reusable Object-Oriented Software Task 싱글톤패턴 싱글톤 패턴 구현 방법을 깨뜨리는 방법 리플렉션을 통해 싱글톤 패턴을 깨뜨리다 역직렬화를 통해 싱글톤

전지환 11 Jul 19, 2022
a fast, scalable, multi-language and extensible build system

Bazel {Fast, Correct} - Choose two Build and test software of any size, quickly and reliably. Speed up your builds and tests: Bazel rebuilds only what

Bazel 20k Jan 4, 2023
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

null 1.5k Jan 4, 2023
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Cossack Labs 1.6k Dec 29, 2022
Automatic creation of simple CRUD API of Spring boot and JPA project.

fast-crud Automatic creation of simple CRUD API of Spring boot and JPA project.

JinHwanKim 18 Oct 23, 2022
MiniMessage Component-based Placeholders for PaperMC and Velocity platforms

MiniMessage Component-based Placeholders for PaperMC and Velocity platforms

null 10 Dec 28, 2022
Caches datapack- and server resources to make world creation faster.

antiresourcereload Caches datapack- and server resources to make world creation faster. Legalisation Status Legal (1.0.2) Description I found out abou

Wurgo 13 Nov 18, 2022
This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncApi and OpenAPI.

SCS MultiApi Maven Plugin This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncAp

Corunet 0 Dec 20, 2022
A Minecraft library for working with minecraft packets on various platforms, using MCProtocolLib

BetterProtocol A Minecraft library for working with minecraft packets on various platforms, using MCProtocolLib This library is still based on the pro

John 8 Jul 2, 2022