GithubHelp home page GithubHelp logo

Comments (2)

nagwww avatar nagwww commented on April 28, 2024 1

This is the config I tried for creating a hello world application in Java

 java_binary(
    name = "main",
    main_class = "Main",
    deps = [":print"],
)

java_library(
    name = "print",
    srcs = ["Main.java"],
) 

Using the latest version of buck2 ( Downloaded from https://github.com/facebook/buck2/releases/tag/latest ) This was updated like 14 hours back.

$ ./buck2-x86_64-apple-darwin build //:main

Getting the following error

buck2-x86_64-apple-darwin build //:main
File changed: prelude//toolchains/demo.bzl
Build ID: e40e9b95-b558-4faf-a75d-00db9f8cc0ab
Jobs completed: 4. Time elapsed: 0.1s.
BUILD FAILED
Error running analysis for `root//:main (prelude//platforms:default#f6691640831d48dd)`

Caused by:
    0: Error looking up configured node root//:main (prelude//platforms:default#f6691640831d48dd)
    1: Error looking up configured node toolchains//:java (prelude//platforms:default#f6691640831d48dd) (prelude//platforms:default#f6691640831d48dd)
    2: looking up unconfigured target node `toolchains//:java`
    3: Unknown target `java` from package `toolchains//`.
       Did you mean one of the 9 targets in toolchains//:BUCK?
       Maybe you meant one of these similar targets?
         toolchains//:cxx
         toolchains//:go
         toolchains//:ocaml
         toolchains//:rust

I was trying to look at the examples provided for cxx and implement the same for java. cxx works great for the example provided here https://github.com/facebook/buck2/blob/main/examples/hello_world/BUCK

It looks like it has rules in prelude folder, but no toolchain wrapper for java.

Was really hoping to get some guidance / pointer to create a wrapper for java. Hoping to send out a PR to buck2 so this would help out the buck2 community.

Thanks and looking forward to get some guidance on creating a toolchain/wrapper for java.

Kind regards,
Nag

from buck2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.