diff options
author | 2016-06-17 05:42:52 +0000 | |
---|---|---|
committer | 2016-06-17 09:27:28 +0000 | |
commit | 807062028f795171e460cb7ad9197727cfb0afe1 (patch) | |
tree | 77c6d4d7b7d05bca6db515f9246bb62db540a516 | |
parent | 6097ad0e2231f69081b52c6bb6dff5c2668ab328 (diff) |
Make setup-intellij.sh work again.
This is purely symptomatic treatment; setup-intellij.sh is just an evil hack until we can get proper IDE integration up and running, so it will do for the time being.
--
MOS_MIGRATED_REVID=125136689
-rwxr-xr-x | scripts/get_all_bazel_paths.sh | 11 | ||||
-rwxr-xr-x | scripts/setup-intellij.sh | 8 |
2 files changed, 10 insertions, 9 deletions
diff --git a/scripts/get_all_bazel_paths.sh b/scripts/get_all_bazel_paths.sh index ef2497967b..4a78ba14e7 100755 --- a/scripts/get_all_bazel_paths.sh +++ b/scripts/get_all_bazel_paths.sh @@ -21,7 +21,7 @@ cd $(dirname "$0") cd .. function query() { - ./output/bazel query --keep_going "$@" + ./output/bazel query --keep_going -- "$@" } # Compile bazel @@ -83,10 +83,11 @@ function get_containing_library() { function collect_generated_paths() { # uniq to avoid doing blaze query on duplicates. - for path in $(find bazel-genfiles/ -name "*.java" | sed 's|/\{0,1\}bazel-genfiles/\{1,2\}|//|' | uniq); do - source_path=$(echo ${path} | sed 's|//|bazel-genfiles/|' | sed 's|/com/.*$||') - echo "$(get_containing_library ${path}):${source_path}" - done | sort -u + (find -L bazel-bin -name '*_srcjar.srcjar' | sed 's/_srcjar.srcjar$/.jar/'; + for path in $(find bazel-genfiles/ -name "*.java" | sed 's|/\{0,1\}bazel-genfiles/\{1,2\}|//|' | uniq); do + source_path=$(echo ${path} | sed 's|//|bazel-genfiles/|' | sed 's|/com/.*$||') + echo "$(get_containing_library ${path}):${source_path}" + done) | sort -u } # GENERATED_PATHS stores pairs of jar:source_path as a list of strings, with diff --git a/scripts/setup-intellij.sh b/scripts/setup-intellij.sh index cd4a19bf04..ac645d8e90 100755 --- a/scripts/setup-intellij.sh +++ b/scripts/setup-intellij.sh @@ -149,16 +149,16 @@ cat >> $iml_file <<'EOF' <orderEntry type="inheritedJdk" /> EOF +for path_pair in ${GENERATED_PATHS}; do + write_jar_entry ${path_pair//:/ } +done + for jar in ${THIRD_PARTY_JAR_PATHS}; do if [[ jar != "$javac_jar" ]]; then write_jar_entry $jar fi done -for path_pair in ${GENERATED_PATHS}; do - write_jar_entry ${path_pair//:/ } -done - write_jar_entry "bazel-bin/src/main/protobuf" cat >> $iml_file <<'EOF' |