Commit graph

19 commits

Author SHA1 Message Date
mcilwain
b5fb62c984 Change all foreach loops in Soy templates to use the for loop syntax
This also updates to a newer version of Closure Rules and fixes a protobuf dep
compile issue.

Full description of the change:

Soy supports 2 kinds of loops:
* foreach- for iterating over items in a collection, e.g.
  {foreach $item in $list}...{/foreach}
* for - for indexed iteration, e.g. {for $i in range(0, 10)}...{/for}

The reason Soy has two different loops is an accident of history; Soy didn’t use
to have a proper grammar for expressions and so the alternate ‘for...range’
syntax was added to make it possible to write indexed loops.  As the grammar has
improved having the two syntaxes is no longer necessary and so we are
eliminating one of them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182843207
2018-01-23 16:16:53 -05:00
jianglai
62d894772a Update kokoro bazel version to 0.6.0
Also updated closure rules version to be compatible with bazel 0.6.0.

See: https://github.com/bazelbuild/rules_closure/releases/tag/0.4.2

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171222636
2017-10-10 12:09:41 -04:00
jianglai
a0014f350e Change closure checksum for foss build
Tested:ran dr-foss-test and passed all tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168412524
2017-09-12 15:52:02 -04:00
lukes
4de8d3eae1 Migrate {css} and {xid} tags to new builtinfunctions css() and xid()
Output should be identical in either syntax, and migration will bring css and xid into consistency with other soy functions, plus it'll allow us to simplify the soy parser.

LSC: https://docs.google.com/document/d/1evNu02pVXGm1QIcN0dTmNi-GnhbCKOWdrZwBJmcNaU0/edit#

Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164887843
2017-08-29 15:56:43 -04:00
jart
edb5240ff5 Use new mirror.bazel.build hostname for Closure Rules library
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155854194
2017-05-17 12:06:34 -04:00
jart
734130aa73 Restructure Maven dependencies in build
We're now using java_import_external instead of maven_jar. This allows
us to specify the relationships between jars, thereby allowing us to
eliminate scores of vendor BUILD files that did nothing but re-export
@foo//jar targets, thus addressing the concerns of djhworld on Hacker
News: https://news.ycombinator.com/item?id=12738072

We now have redundant failover mirrors, which is a feature I added to
Bazel 0.4.2 in ed7ced0018

A new standard naming convention is now being used for all Maven repos.
Those names are calculated from the group_artifact name using the
following algorithm that eliminates redundancy:
https://gist.github.com/jart/41bfd977b913c2301627162f1c038e55

The JSR330 dep has been removed from java targets if they also depend
on Dagger, since Dagger always exports JSR330.

Annotation processor dependencies should now be leaner and meaner, by
more appropriately managing what needs to be on the classpath at
runtime. This should trim down the production jar by >1MB. As it stands
currently in the open source world:

- backend_jar_deploy.jar: 50MB
- frontend_jar_deploy.jar: 30MB
- tools_jar_deploy.jar: 45MB

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143487929
2017-01-09 11:59:04 -05:00
mcilwain
bd0e4f834b Use latest version of Closure Rules
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141330593
2016-12-08 11:22:06 -05:00
jart
59f4984083 Upgrade Nomulus to latest Closure Rules
Significant technical debt has been eliminated. The latest best
practices are also now adopted for dealing with runfiles and dealing
with files across repositories.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140762937
2016-12-06 11:52:46 -05:00
jart
ad66f805cf Fix Closure transpile.js build error
See also:
- google/closure-compiler#2051
- bazelbuild/rules_closure@9e92334

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135138725
2016-10-05 11:58:23 -04:00
Justine Tunney
e1dc6d5adb Upgrade Closure Rules to v0.2.5
This CL fixes an issue preventing App Engine deploys in the open source
world, because an old version of Soy had its Maven jars compiled for Java
1.8. Upgrading to the latest Closure Rules release fixes this.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128841077
2016-08-02 19:14:13 -04:00
jart
5ebfb87651 Update Domain Registry to Closure Rules v0.2.3
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126911095
2016-07-13 15:44:35 -04:00
Justine Tunney
e1cf51ebb3 Migrate Domain Registry to Closure Rules 0.1.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122525197
2016-05-17 13:53:41 -04:00
Michael Muller
c458c05801 Rename Java packages to use the .google TLD
The dark lord Gosling designed the Java package naming system so that
ownership flows from the DNS system. Since we own the domain name
registry.google, it seems only appropriate that we should use
google.registry as our package name.
2016-05-13 20:04:42 -04:00
jart
5b80d74988 Make external dependencies importable
This will make it easier for Donuts to do loose coupling of
repositories. Without this change, they would have to copy everything
from our WORKSPACE file by hand.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116674743
2016-03-08 14:18:03 -05:00
jart
a063508b5b Make bazel build fully hermetic
We no longer reference @bazel_tools//third_party. All of our transitive
dependencies are now specified explicitly in our WORKSPACE file.

I also fixed the way that jar dependencies are exported, so we don't
break strict dependency checking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116421176
2016-03-04 21:13:06 -05:00
jart
675ec8f086 Remove repeated maven_jar()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116210057
2016-03-04 16:22:05 -05:00
jart
ddd45b22fb Give core registry libraries public visibility
This is so Donuts can create entirely separate Bazel repositories that
link against the Domain Registry codebase.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116182448
2016-03-04 16:20:50 -05:00
jart
6c6f70c24f Remove google_java_format dependency
This dependency is only needed by the internal version of Dagger, which
hasn't been rolled out to the public yet.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116097182
2016-03-04 16:13:57 -05:00
Justine Tunney
0ef0c933d2 Import code from internal repository to git 2016-03-01 17:59:16 -05:00