google-nomulus/java/google/registry
brndn d3f3d3ceb0 Migrate SoyDoc params involving maps to header param syntax
Soy has historically tolerated map accesses on weakly-typed variables. That is, if a template declared a param $p and then did $p['some_key'] in the template body, Soy would treat $p as a map even if it wasn't statically declared as one.

This situation is changing with [] There are now two map types, `map` and `legacy_object_map`. We are trying to migrate every template in [] from `legacy_object_map` to `map`, leaving Soy with one (improved) map type. Because the two map types generate different JS code, Soy can no longer allow map accesses on weakly-typed variables. (If $p['some_key'] occurs in a template and the type of $p is unknown, Soy would not know what code to generate.)

Every parameter whose static type is unknown (`?`) but which is inferred to be a `legacy_object_map` needs to be migrated to a `map`. We are developing tools for this in [] However, as a first step, we need to migrate the subset of these params that use the legacy SoyDoc syntax to use header param syntax with a static type of `?`. (All params declared in SoyDoc are typed as unknown, and it is a compilation error to mix SoyDoc and header param syntax in the same template, so any template that declares a SoyDoc param that is inferred to be a map needs to migrate to header param syntax.)

This CL was prepared by using the tools in [] to create a list of templates declaring SoyDoc params inferred to be legacy_object_maps. This list was then fed to the existing //third_party/java_src/soy/java/com/google/template/soy/tools:ParamMigrator tool. Since this tool migrates whole files instead of individual templates, the resulting CL is a superset of the migration that is actually required. However, since the SoyDoc param syntax has been deprecated for years, and since there is little risk in migrating from one param style to another, I decided to land the superset.

This migration falls under the LSC described at https://docs.google.com/document/d/1dAl-rDMp3oL0Zh_iSTaiHICwtcbLbVIy1FQ0wXSAaHs.
Tested:
    TAP --sample for global presubmit queue
    []    passed FOSS tests

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188879980
2018-03-19 18:23:33 -04:00
..
backup Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
batch Accept a list of TLDs on which to delete "prober" (test) data. 2018-03-06 19:03:48 -05:00
beam Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
bigquery Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
braintree Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
builddefs Rename set to depset in .bzl and BUILD files 2017-08-29 16:53:21 -04:00
config Make the async delete delay configurable in YAML config files 2018-03-06 19:06:52 -05:00
cron Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
dns Increase Cloud DNS rate limit to 50 QPS 2018-03-06 19:21:54 -05:00
eclipse Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
env Turn off deleteProberData on alpha for duration of loadtesting 2018-03-06 19:09:52 -05:00
export Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
flows Change RESTORE BillingEvents to have 1-year periods 2018-03-06 19:25:05 -05:00
gcs Add publish functionality to billing pipeline 2018-01-04 17:17:59 -05:00
groups Clean up some code quality issues 2017-12-01 22:14:06 -05:00
idn Update IDN tables to comply with https://www.iana.org/help/idn-repository-procedure 2018-02-01 21:59:14 -05:00
keyring Wrap exception properly in PgpHelper 2018-03-08 14:49:17 -05:00
loadtest Replace com.google.common.base.Function with java.util.function.Function 2017-12-27 11:08:55 -05:00
mapreduce Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
model Change RESTORE BillingEvents to have 1-year periods 2018-03-06 19:25:05 -05:00
module Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
monitoring/whitebox Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
pricing Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
proxy Handle malformed proxy protocol header 2018-03-06 19:26:31 -05:00
rdap RDAP: Show registrar entity even if contacts are redacted 2018-03-06 19:00:47 -05:00
rde Add //third_party/java/jaxb dependency to targets using javax.xml.bind 2018-01-23 16:18:35 -05:00
reporting Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
request Refactor ICANN reporting and billing into common package 2018-02-01 21:56:06 -05:00
security Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
storage/drive Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tldconfig/idn Move backported JUnit file to third_party (part 2) 2017-12-02 11:37:46 -05:00
tmch Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
tools Add a "shell" pseudo-command to nomulus tool 2018-03-19 18:22:01 -04:00
ui Migrate SoyDoc params involving maps to header param syntax 2018-03-19 18:23:33 -04:00
util Add sharded DNS publishing capability 2018-03-06 19:14:26 -05:00
whois Rationalize logging statements across codebase 2018-01-19 14:56:45 -05:00
xjc Add //third_party/java/jaxb dependency to targets using javax.xml.bind 2018-01-23 16:18:35 -05:00
xml Add //third_party/java/jaxb dependency to targets using javax.xml.bind 2018-01-23 16:18:35 -05:00
BUILD Add nocron ear and deployer rules for the crash environment 2017-10-04 16:16:45 -04:00
repositories.bzl Update FOSS build monitoring client version 2018-03-06 19:18:50 -05:00