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

Add build instructions #6

Open
fbricon opened this issue Apr 19, 2018 · 8 comments
Open

Add build instructions #6

fbricon opened this issue Apr 19, 2018 · 8 comments
Labels

Comments

@fbricon
Copy link

fbricon commented Apr 19, 2018

Bazel being less ubiquitous than Maven and Gradle, it'd be nice if there were some build instructions in the CONTRIBUTING.md page

@ronshapiro
Copy link
Collaborator

Just to clarify: are you asking about how to build locally to develop features inside Flogger?

@jfnavin
Copy link

jfnavin commented May 10, 2018

+1

I have attempted to fork the project to make a change and am having a lot of trouble getting it to import into IntelliJ IDEA and/or build.

Running bazel build at the root doesn't seem to do much.

@davido
Copy link

davido commented May 10, 2018

Running bazel build at the root doesn't seem to do much.

I'm not following. bazel build does a lot here:

  $ bazel build //...
  [...]
  $ bazel test //...
  INFO: Analysed 51 targets (0 packages loaded).
INFO: Found 24 targets and 27 test targets...
INFO: Elapsed time: 3.462s, Critical Path: 1.53s
INFO: 27 processes, linux-sandbox.
INFO: Build completed successfully, 28 total actions
//api:src/test/java/com/google/common/flogger/FluentLoggerTest           PASSED in 0.7s
//api:src/test/java/com/google/common/flogger/LogContextTest             PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/LogSiteStackTraceTest      PASSED in 0.4s
//api:src/test/java/com/google/common/flogger/LogSiteStatsTest           PASSED in 0.4s
//api:src/test/java/com/google/common/flogger/LoggerConfigTest           PASSED in 0.4s
//api:src/test/java/com/google/common/flogger/MetadataKeyTest            PASSED in 0.7s
//api:src/test/java/com/google/common/flogger/backend/FormatCharTest     PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/backend/FormatOptionsTest  PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/backend/FormatTypeTest     PASSED in 1.0s
//api:src/test/java/com/google/common/flogger/backend/KeyValueFormatterTest PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/backend/SimpleMessageFormatterTest PASSED in 0.7s
//api:src/test/java/com/google/common/flogger/backend/TagsTest           PASSED in 1.0s
//api:src/test/java/com/google/common/flogger/backend/system/AbstractBackendTest PASSED in 0.7s
//api:src/test/java/com/google/common/flogger/backend/system/DefaultPlatformTest PASSED in 1.1s
//api:src/test/java/com/google/common/flogger/backend/system/SimpleBackendLoggerTest PASSED in 0.8s
//api:src/test/java/com/google/common/flogger/backend/system/SimpleLogRecordTest PASSED in 0.8s
//api:src/test/java/com/google/common/flogger/parameter/ParameterTest    PASSED in 0.6s
//api:src/test/java/com/google/common/flogger/parameter/SimpleParameterTest PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/parser/BraceStyleMessageParserTest PASSED in 0.8s
//api:src/test/java/com/google/common/flogger/parser/DefaultBraceStyleMessageParserTest PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/parser/DefaultPrintfMessageParserTest PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/parser/PrintfMessageParserTest PASSED in 0.9s
//api:src/test/java/com/google/common/flogger/util/CallerFinderTest      PASSED in 0.8s
//api:src/test/java/com/google/common/flogger/util/FastStackGetterTest   PASSED in 0.7s
//api:src/test/java/com/google/common/flogger/util/StackBasedLogSiteTest PASSED in 0.8s
//google:src/test/java/com/google/common/flogger/GoogleLoggerTest        PASSED in 0.9s
//google:src/test/java/com/google/common/flogger/PackageSanityTest       PASSED in 1.4s

Particularly, I'm seeing now these artifacts: bazel-bin/api/libapi.jar`:

  $ bazel build api:api
INFO: Analysed target //api:api (0 packages loaded).
INFO: Found 1 target...
Target //api:api up-to-date:
  bazel-bin/api/libapi.jar
INFO: Elapsed time: 0.179s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action

and: bazel-bin/api/libsystem_backend.jar:

$ bazel build api:system_backend
INFO: Analysed target //api:system_backend (0 packages loaded).
INFO: Found 1 target...
Target //api:system_backend up-to-date:
  bazel-bin/api/libsystem_backend.jar
INFO: Elapsed time: 0.154s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action

My Bazel version used: 0.13.0, on Linux.

@davido
Copy link

davido commented May 10, 2018

Bazel being less ubiquitous than Maven and Gradle, it'd be nice if there were some build instructions in the CONTRIBUTING.md page

Every Bazel build instructions are three liners:

  • Install Bazel
  • Run build bazel build //...
  • Run tests bazel test //...

@jfnavin
Copy link

jfnavin commented May 10, 2018

Cheers - I missed the ... (which turns out to be important :) )

@tbroyer
Copy link

tbroyer commented Jun 5, 2018

@IRus
Copy link

IRus commented May 3, 2019

Maybe use gradle as first-class build system, and add task to generate basel config from it?

@davido
Copy link

davido commented May 6, 2019

@ronshapiro I added this issue to build flogger on Bazel CI to avoid unnoticed breakages like the one you fixed in: [1].

[1] google/bazel-common#37

@raghsriniv raghsriniv added the P3 label Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants