Comments (13)
Apparently there is a problem related to aspect and alias rules. I though it was fixed?
from eclipse.
Any news on this? Should I be pulling the project and trying to fix locally to make progress on this issue?
from eclipse.
@psaville-google sorry, @dslomov is on holidays.
from eclipse.
@psaville-google Have you tried with Bazel @Head?
from eclipse.
Which Bazel version are you using? I checked and this should be fixed at HEAD, probably in
from eclipse.
My workspace is as follows:
WORKSPACE:
maven_jar(
name="maven_jar",
artifact="com.google.guava:guava:18.0",
sha1="cce0823396aa693798f8882e64213b1772032b09")
bind(name="library", actual="@maven_jar//jar")
java/BUILD:
config_setting(
name = "local",
values = {"define": "localjars=true"},
)
alias(
name = "a",
actual = select({
":local": "locallib",
"//conditions:default": "//external:library",
}),
)
java_library(
name = "locallib",
srcs = ["Local.java"],
)
java_binary(
name = "bin",
main_class = "a.Wtf",
runtime_deps = [":a"],
)
Both
bazel build --nobuild //java:bin --nocheck_visibility
and
bazel build --nobuild //java:bin --nocheck_visibility --define=localjars=true
Work as expected.
from eclipse.
@kchodorow : I'm surprised that the dependency on @maven_jar//jar
requires --nocheck_visibility
. Is this a known issue?
from eclipse.
@dmarting: I indeed forget about the e4b aspect and now I can actually repro it. Clickety-click...
from eclipse.
lberki,
Your workspace isn't quite how I set it up. I'll clarify here just for
completeness.
WORKSPACE:
maven_jar(
name = "maven_liba",
...
)
bind(
name = "liba",
actual = "//local:liba"
)
local/BUILD:
config_setting(
name = "local",
... some define to trigger localjars
)
java_library(
name = "local_liba",
srcs = ["local_liba.jar"],
)
alias(
name = "liba",
actual = select({
":local": ":local_liba",
"//conditions:default": "@maven_liba//jar"
)
src/java/some-package/BUILD:
java_library(
name = "doesnt_matter",
srcs = glob(...),
deps = [
"//external:liba",
...
],
)
Thus, the some-package java can always depend on //external:liba.
We have a jenkins job that downloads an hermetic snapshot of libraries (may
come from another git repo) and builds using the additional --define flags.
The eclipse project now needs to evaluate the //external:liba dependency as
the @maven_liba//jar dependency.
Thanks for working on this - much appreciated.
from eclipse.
Sorry for pinging a closed issue.
When and how does your updatesite get updated, after change commits?
Thanks.
from eclipse.
Manually :) but this was a problem on the Bazel side so it does not need
any change to the plugin only to Bazel (so basically recompile bazel from
master and you should have the bug fixed).
On Thu, Sep 1, 2016, 10:17 PM psaville-google [email protected]
wrote:
Sorry for pinging a closed issue.
When and how does your updatesite get updated, after change commits?
Thanks.
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#6 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADjHfxzJdDUeziCcrHyyT1TNLyzKgXooks5qlzLPgaJpZM4Jm7Sa
.
from eclipse.
I pulled a local bazel repo clone and built bazel from HEAD yesterday in order to test if this is working with e4b.
Sadly, it still doesn't work.
*** Running [/usr/local/bin/bazel, --watchfs, build, --package_path, %workspace%:/Users/psaville/eclipse/java-neon/Eclipse.app/Contents/Eclipse/../../../../../.p2/pool/plugins/com.google.devtools.bazel.e4b_0.0.1.201604271316/resources, --experimental_interleave_loading_and_analysis, --strategy=Javac=worker, --noexperimental_check_output_files, --aspects=tools/must/be/unique/e4b_aspect.bzl%e4b_aspect, //java/..., //javatests/..., //example/java/..., //scripts/testing/tee:setup_tee, //production/kubernetes/..., //example/java/..., //scs/rapidsync:all] from /Users/psaville/git-gerrit/skybox3 ***
WARNING: Option 'experimental_interleave_loading_and_analysis' is deprecated.
____Loading...
ERROR: /private/var/tmp/_bazel_psaville/33cf99881007ceae82889b09c83f121b/external/maven_prodx_libprodx/jar/BUILD:2:1: in //tools/must/be/unique:e4b_aspect.bzl%e4b_aspect aspect on java_import rule @maven_prodx_libprodx//jar:jar:
Traceback (most recent call last):
File "/private/var/tmp/_bazel_psaville/33cf99881007ceae82889b09c83f121b/external/maven_prodx_libprodx/jar/BUILD", line 2
//tools/must/be/unique:e4b_aspect.bzl%e4b_aspect(...)
File "/Users/psaville/.p2/pool/plugins/com.google.devtools.bazel.e4b_0.0.1.201604271316/resources/tools/must/be/unique/e4b_aspect.bzl", line 101, in _aspect_impl
(java_rule_ide_info, java_ide_resol...) = java_rule_ide_info(target, ctx)
Variable 'java_rule_ide_info' is referenced before assignment. The variable is defined in the global scope..
ERROR: /private/var/tmp/_bazel_psaville/33cf99881007ceae82889b09c83f121b/external/maven_prodx_flags/jar/BUILD:2:1: in //tools/must/be/unique:e4b_aspect.bzl%e4b_aspect aspect on java_import rule @maven_prodx_flags//jar:jar:
Traceback (most recent call last):
File "/private/var/tmp/_bazel_psaville/33cf99881007ceae82889b09c83f121b/external/maven_prodx_flags/jar/BUILD", line 2
//tools/must/be/unique:e4b_aspect.bzl%e4b_aspect(...)
File "/Users/psaville/.p2/pool/plugins/com.google.devtools.bazel.e4b_0.0.1.201604271316/resources/tools/must/be/unique/e4b_aspect.bzl", line 101, in _aspect_impl
(java_rule_ide_info, java_ide_resol...) = java_rule_ide_info(target, ctx)
Variable 'java_rule_ide_info' is referenced before assignment. The variable is defined in the global scope..
ERROR: Analysis of aspect '/tools/must/be/unique/e4b_aspect.bzl%e4b_aspect of //example/java:ExampleServer' failed; build aborted.
from eclipse.
:/ Can you open a separate bug?
from eclipse.
Related Issues (20)
- did not find "Import Project..." > "Others". HOT 1
- No way to add optional arguments to build command HOT 2
- Problems loading bazel itself from eclipse HOT 4
- Path to external maven jar are incorrect HOT 1
- End to end tests
- Skylark editor
- Launch command to run java_binary and java_test from Eclipse including debug mode HOT 2
- BUILD file editor
- Have the ability to read Intellij With Bazel project view file
- Improve documentation by having a proper website
- Add more tests HOT 2
- Improve installation and set-up of the plugin HOT 5
- Improve the support of building eclipse plugin for Bazel
- Change repo name to be bazelbuild/eclipse HOT 11
- Eclipse for bazel, how to run project? HOT 1
- Plugin doesn't work against recent Bazel version HOT 7
- New release? HOT 3
- object of type 'Target' has no field 'intellij_info_files' HOT 4
- Please move from native to Starlark rules for external git/http repositories HOT 1
- updatesite has an error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse.