Git Product home page Git Product logo

closure-templates's Introduction

Closure Templates

Closure Templates are a client- and server-side templating system that helps you dynamically build reusable HTML and UI elements. They have a simple syntax that is natural for programmers, and you can customize them to fit your application's needs. In contrast to traditional templating systems,in which you must create one monolithic template per page, you can think of Closure Templates as small components that you compose to form your user interface. You can also use the built-in message support to easily localize your applications.

Closure Templates are implemented for both JavaScript and Java, so that you can use the same templates on both the server and client side. They use a data model and expression syntax that work for either language. For the client side, Closure Templates are precompiled into efficient JavaScript.

What are the benefits of using Closure Templates?

  • Convenience. Closure Templates provide an easy way to build pieces of HTML for your application's UI and help you separate application logic from display.
  • Language-neutral. Closure Templates work with JavaScript or Java. You can write one template and share it between your client- and server-side code.
  • Client-side speed. Closure Templates are compiled to efficient JavaScript functions for maximum client-side performance.
  • Easy to read. You can clearly see the structure of the output HTML from the structure of the template code. Messages for translation are inline for extra readability.
  • Designed for programmers. Templates are simply functions that can call each other. The syntax includes constructs familiar to programmers. You can put multiple templates in one source file.
  • A tool, not a framework. Works well in any web application environment in conjunction with any libraries, frameworks, or other tools.
  • Battle-tested. Closure Templates are used extensively in some of the largest web applications in the world, including Gmail and Google Docs.
  • Secure. Closure Templates are contextually autoescaped to reduce the risk of XSS.

Getting Started

Support and Project status

Closure Templates is widely used and well maintained internally at Google but does not currently have staffing to support the open source release. As such this project is mostly a 'code dump' and support is minimal. For certain issues, like build integration we are in an especially bad position to offer support.

To get assistance you can use any of the following forums

  1. Look through the documentation.
  2. Post a question to the closure-templates-discuss mailing list.
  3. File a bug on github

Though, given our support staffing, we may not be able to help.

Using Closure Templates with other open source frameworks

There are many Closure Template integrations with other popular open source frameworks. Here are a few options for getting started:

closure-templates's People

Contributors

concavelenz avatar cpovirk avatar cushon avatar davidcphillips avatar emspishak avatar fejesjoco avatar iteriani avatar jesse-good avatar jobi avatar kluever avatar lukesandberg avatar mbrukman avatar mikesamuel avatar mknichel avatar mprobst avatar nanaze avatar nathancomstock avatar nicholasyu-google avatar nreid260 avatar orischwartz avatar sameb avatar shicks avatar slaks avatar smkarwa avatar sumitbhagwani avatar szabodabo avatar ubehebe avatar varomodt avatar vrana avatar zhangskz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

closure-templates's Issues

Undefined method when compiling soyutils_usegoog.js

When I try to compile the file with the rest of scripts of my application the compiler outputs this error:

client/vendor/closure-templates/soyutils_usegoog.js:1864: ERROR - Property runtimeType never defined on goog.debug
      (goog.DEBUG ? (', but got ' + goog.debug.runtimeType(param)) : '') +

I am using goog.DEBUG=false in the compiler flags. I've tried to find the method in the Closure Library but I don't know where it's defined or why it's not found.

Nested loops with parameters

Hello,

We're using Google Closure Templates on our website and we've run into an issue we just can't find a solution for.

We're setting up a sub template and we want to loop through an unknown amount of variables. We tried using nested loops but it's not working! Here's an example of the parameters sent to the SOY template below. We don't know how many sections will be provided. When trying to do a nested loop it simply doesn't work, it's only getting the first occurence:

                var secondarymenu = document.getElementById("wb-sec");
                secondarymenu.innerHTML = wet.builder.secmenu({
                    sections: [{
                        sectionName: "Section name",
                        menuLinks: [{
                            href: "#",
                            text: "Link 1"
                        }, {
                            href: "#",
                            text: "Link 2"
                        }, {
                            href: "#",
                            text: "Link 3"
                        }, {
                            href: "#",
                            text: "Link 4"
                        }]},{
                        sectionName: "Section name 2",
                        menuLinks: [{
                            href: "#",
                            text: "Link 1"
                        }, {
                            href: "#",
                            text: "Link 2"
                        }, {
                            href: "#",
                            text: "Link 3"
                        }, {
                            href: "#",
                            text: "Link 4"
                        }]},{
                        // Rinse and repeat
                        sectionName: "Section name 3",
                        menuLinks: [{
                            href: "#",
                            text: "Link 1"
                        }, {
                            href: "#",
                            text: "Link 2"
                        }, {
                            href: "#",
                            text: "Link 3"
                        }, {
                            href: "#",
                            text: "Link 4"
                        }]}
                    ];
                });

Any help that can be provided would be great, thanks!

Roch Lambert

Export JS @typedef for template parameters

Consider the following template built with --shouldGenerateJsdoc parameter with strict typing:

{namespace test}
{template .template}
    {@param stringParam: string}
    {@param htmlParam: html}
    {@param listParam: list<string>}
    ...
{/template}

The generated JS code looks pretty much like this:

/**
 * @param {{
 *    stringParam: string,
 *    htmlParam: (soydata.SanitizedHtml|string),
 *    listParam: !Array<string>
 *    ...
 * }} opt_data
 * @param {(null|undefined)=} opt_ignored
 * @return {!soydata.SanitizedHtml}
 * @suppress {checkTypes}
 */
test.template = function(opt_data, opt_ignored) {
  ...
};

When you need to pass the opt_data to goog.soy.renderXx() method for example from return value of an another method, you have to copy paste quite considerable type definition, if you want Closure Compiler to pass without errors on such code. The more parameters, the more copy pasting needed of course.

/**
 * @return {{
 *    stringParam: string,
 *    htmlParam: (soydata.SanitizedHtml|string),
 *    listParam: !Array<string>
 *    ...
 * }}
 */
test.getOptData = function() {
    return { ... }
}

test.render = function() {
    goog.soy.renderElement(test.template, this.getOptData());
    ...

It would be much easier to have generated @typedef available for usage in these cases, for simplification like this:

/**
 * @return {test.template.TypeDef}
 */
test.getOptData = function() { ...

The generated template code might look following:

/**
 * @param {test.template.TypeDef} opt_data
 * @param {(null|undefined)=} opt_ignored
 * @return {!soydata.SanitizedHtml}
 * @suppress {checkTypes}
 */
test.template = function(opt_data, opt_ignored) {
  ...
};

/**
 * @typedef {{
 *    stringParam: string,
 *    htmlParam: (soydata.SanitizedHtml|string),
 *    listParam: !Array<string>
 *    ...
 * }};
 */
test.template.TypeDef;

I had a short sweep through the code involved and I can come with PR if this is considered useful and acceptable. I guess some command line switch for this behaviour would be appropriate.

Warning "bootstrap class path not set in conjunction with -source 1.7"

I am fairly new to the library, but I am failing to compile it (trying to add some helpers).

My system is an OSX 10.9 and Java version is "1.8.0_25".

Simply running ant will generate the warning which aborts the build process. If I remove the -Werror switch in the build.xml file, the compilation finishes without problems.

It's my understanding that SoyToJsSrcCompiler.jar wants Java 1.7 (I had to upgrade my old Java 1.6 to be able to run it), but in the build.xml the target is 1.6 (which is probably what is generating this problem). It seems a bit confusing.

Option to compile to AMD

Similar to #30, it would be very nice for AMD users to have the option to compile modules to AMD so that a project's own dependency management system of choice can be used. (Where I work, we currently add an AMD wrapper around all Closure Templates-generated JS, but still have to manually ensure that any inner templates that get called are manually added as dependencies of the caller).

Someone submitted a patch for this awhile back in https://code.google.com/p/closure-templates/issues/detail?id=29& , but I've had trouble tracking the author down to see if they'd want to resubmit this now that project is on GH.

getHackySoyFileSetFactory warning

I updated my plovr fork to use the latest closure-* repositories. However, I get the following warning from closure-templates:

Jul 02, 2014 1:18:50 PM com.google.template.soy.GuiceInitializer getHackySoyFileSetFactory
WARNING: Falling back to statically-injected SoyFileSetFactory; unpredictable behavior is likely. Instead of constructing a SoyFileSet.Builder directly, either inject it using Guice (with SoyModule installed), or call the static SoyFileSet.builder() method.

Maybe it's part of the hacky method name, but I just wanted to be sure.

How can live without inheritance in closure templates in big project?

We use closure library and closure compiler, and we want to use closure templates.
But closure templates haven't got inheritance. That's really a problem for us.

As I understand, the reason why closure templates don’t have inheritance, is because templates must be simple, and easy to read.

But how can you live without inheritance in big projects?

For example, we have a template file button.soy that generates button with public template project.createButton and private templates: project.createOpenTag_, project.createCSSClasses_, project.createAttributes_, project.createContent_, project.createCloseTag_.
We have js class project.Button, and we have project.ButtonCircle (perhaps this separate class project.ButtonCircle seems unnecessary, but it's just an example) which extends project.Button.
project.ButtonCircle needs little changes made in project.createButton template.

Of course we can add new functionality to project.createButton, but it's a very bad idea, because such approach will create monster templates in the future.

Or we can create public template project.createCircleButton in file button-circle.soy, call all private templates from project.createButton in it, and when we need to 'override' one of these private templates, (for example project.createCSSClasses_), we just create new private template in button-circle.soy with name project.createCSSClassesCirbleButton_.
Yet in this case we need to copy-paste all content from project.createButton to project.createCircleButton. That's terrible.

Also we tried using Delegate Templates, but it's not suited for inheritance.

What is approach towards this problem?

I also post this question here: http://stackoverflow.com/questions/32737422/how-can-live-without-inheritance-in-closure-templates-in-big-project

Missing README

As per #14 it would be nice for this project to have a proper README, with:

  • Short project description and status (if it being maintained and by who)
  • Link to documentation
  • Changelog (alternatively we could have a CHANGELOG file)
  • Licence
  • (Something else?)

I can try to work out a pull request if the core devs feel this is something can the community can do.

Goog dependency in soyutils for client side closure templates rendering

It is understood that in order to use soy to JavaScript compilator one has to use soyutils.js, I created long time ago a bower component, which contains soyutils:

https://github.com/matiwinnetou/soyutils

All would be good if it wasn't for release from 2014-04-22, which now requires goog library. Why has this been change? There are people outside of google who would like to use soyutils and render soy templates client side, who actually have no desire or need to use goog library and now there is a dependency on this? I understand that in google for most project if not all, goog is sort of prerequisite anyway but outside of google this may not be the case.

What we also established is that soyutils without goog + client side rendering works but one cannot use latest features: especially typed parameters.

My question therefore why is goog now a dependency for soyutils. We have a FE Engineer at work who tries now to create a minified soyutils bundle and now it weights about 150kb (soyutils + goog) minified.

Is it possible that in future version of soy this requirement will be dropped? 150 kb for us is not only problem from Site Speed point of view (performance) but more importantly because people still have EDGE and slower mobile connections for which they pay for ever MB to load websites.

Option to compile to ES6 Modules

Soy currently compiles to JS globals, which is still a good "least common denominator" choice. Forward-looking projects are already using ES6 modules and transpiling it back to whatever format they like (AMD, CommonJS, globals, whatever). An option to compile to ES6 modules is a good current choice, and in the future will be a better default choice.

SanitizersTest#testNormalizeUriAndFilterNormalizeUri corrupts terminal output

If you run mvn test from the command line, your terminal will turn into garbage. I believe this is caused by this line in SanitizersTest:

assertEquals("#zSoyz", Sanitizers.filterNormalizeUri("\u000e  javascript:alert('XSS');"));

I believe \u000e is interpreted by terminals as an ANSI escape code (specifically "change screen to 16-color graphics"). This input makes it to the console because Sanitizers#filterNormalizeUri logs the malformed input directly to a java.util.logging.Logger.

This is more of an annoyance than a problem; the corrupted terminal doesn't cause the tests to fail, and you can get back to a good state by typing reset. (It also doesn't affect Google internally.) But it would be nice to fix before we create a CI server for the project.

I'm against adding logic to Closure Templates to escape strings for terminal display, or adding a dependency on a library that has such logic. I think the easiest thing to do is just configure the tests to log at level SEVERE (since the corrupting log message is a WARNING). @tbroyer, @nathancomstock, WDYT?

plural/select support in xliff

Would a patch that implements this with xliff 'g' elements be accepted? I know how to write an xliff export that works fine, and the exported templates already rely on Closure-specific 'x' placeholder handling.

Support for Type aliases

From what I've gathered, there is no easy way to specify type aliases or custom types (especially if you want server- and client-side rendering). We've been using records in our templates, but that leaves us with large amounts of repeated param definitions (that are also responsible for the majority of a template's code). For example:

{template .Foo}
  {@param tweet: [
    // massive record
  ]}

  <div>
    {call .Bar}
      {param tweet: $tweet /}
    {/call}
  </div>
{/template}

{template .Bar}
  {@param tweet: [
    // massive record
  ]}

  <div>
    {$tweet.text}
  </div>
{/template}

SoySyntaxException: Undefined field for param that have two record type

INTERNAL SOY ERROR.
Please open an issue at https://github.com/google/closure-templates/issues with this stack trace and repro steps
com.google.template.soy.base.SoySyntaxException: In file blocks/b-bouton/b-bouton.soy:19:5, template gorod.bBouton.Bo
utonTemplate.render: Invalid expression "$params.label2": Undefined field 'label2' for record type [label: string]
at com.google.template.soy.base.SoySyntaxException.createWithoutMetaInfo(SoySyntaxException.java:53)
at com.google.template.soy.soytree.SoySyntaxExceptionUtils.createWithNode(SoySyntaxExceptionUtils.java:47)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor$ResolveTypesExprVisitor.createException
ForInvalidExpr(ResolveExpressionTypesVisitor.java:890)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor$ResolveTypesExprVisitor.getFieldType(Re
solveExpressionTypesVisitor.java:780)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor$ResolveTypesExprVisitor.getFieldType(Re
solveExpressionTypesVisitor.java:802)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor$ResolveTypesExprVisitor.visitFieldAcces
sNode(ResolveExpressionTypesVisitor.java:461)
at com.google.template.soy.exprtree.AbstractExprNodeVisitor.visit(AbstractExprNodeVisitor.java:92)
at com.google.template.soy.exprtree.AbstractExprNodeVisitor.visit(AbstractExprNodeVisitor.java:70)
at com.google.template.soy.basetree.AbstractNodeVisitor.visitChildren(AbstractNodeVisitor.java:64)
at com.google.template.soy.exprtree.AbstractExprNodeVisitor.visitChildren(AbstractExprNodeVisitor.java:129)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor$ResolveTypesExprVisitor.visitExprRootNo
de(ResolveExpressionTypesVisitor.java:370)
at com.google.template.soy.exprtree.AbstractExprNodeVisitor.visit(AbstractExprNodeVisitor.java:80)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor$ResolveTypesExprVisitor.exec(ResolveExp
ressionTypesVisitor.java:362)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor.visitExpressions(ResolveExpressionTypes
Visitor.java:282)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor.visitSoyNode(ResolveExpressionTypesVisi
tor.java:270)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor.visitPrintNode(ResolveExpressionTypesVi
sitor.java:134)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:89)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:55)
at com.google.template.soy.basetree.AbstractNodeVisitor.visitChildren(AbstractNodeVisitor.java:64)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitChildren(AbstractSoyNodeVisitor.java:131)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor.visitSoyNode(ResolveExpressionTypesVisi
tor.java:274)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor.visitTemplateNode(ResolveExpressionType
sVisitor.java:130)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitTemplateBasicNode(AbstractSoyNodeVisitor.java:
162)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:68)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:55)
at com.google.template.soy.basetree.AbstractNodeVisitor.visitChildren(AbstractNodeVisitor.java:64)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitChildren(AbstractSoyNodeVisitor.java:131)
at com.google.template.soy.sharedpasses.ResolveExpressionTypesVisitor.visitSoyNode(ResolveExpressionTypesVisi
tor.java:274)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitSoyFileNode(AbstractSoyNodeVisitor.java:158)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:66)
at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:55)
at com.google.template.soy.basetree.AbstractNodeVisitor.exec(AbstractNodeVisitor.java:45)
at com.google.template.soy.SoyFileSetParser.runSingleFileParsingPasses(SoyFileSetParser.java:265)
at com.google.template.soy.SoyFileSetParser.parseWithVersions(SoyFileSetParser.java:185)
at com.google.template.soy.SoyFileSetParser.parse(SoyFileSetParser.java:142)
at com.google.template.soy.SoyFileSet.compileToJsSrcFiles(SoyFileSet.java:965)
at com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:305)
at com.google.template.soy.SoyToJsSrcCompiler.access$100(SoyToJsSrcCompiler.java:41)
at com.google.template.soy.SoyToJsSrcCompiler$1.main(SoyToJsSrcCompiler.java:246)
at com.google.template.soy.MainClassUtils.runInternal(MainClassUtils.java:195)
at com.google.template.soy.MainClassUtils.run(MainClassUtils.java:187)
at com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:243)

Template:

{template .render}
    {@param params: [
        label: string
    ]|[
        label: string,
        label2: string
    ]}

    { $params.label }
    { $params.label2 }
{/template}
{call gorod.bBouton.BoutonTemplate.render}
    {param params : [
        'label': '',
        'label2': ''
    ]/}
{/call}

Support compatible deltemplates with different optional arguments

Right now, if you have two deltemplates that accept different optional arguments, you get an error. Here's an example.

/**
  * @param? nickelCount
  */
{deltemplate coin.item variant="'nickel'"}
  I have {$nickelCount} nickels
{/deltemplate}

/**
  * @param? dimeCount
  */
{deltemplate coin.item variant="'dime'"}
  {if $dimeCount > 100}I'm rich{/if}
{/deltemplate}

closure-templates complains "SoySyntaxException: Found delegate template with same name blahblah but different param declarations"

I don't understand why this is a syntax error. The declarations are perfectly compatible with each other. Is there a good reason why I have to list the optional params of all the other deltemplates?

commonJS asynchronous module definition support

Migrated from https://code.google.com/p/closure-templates/issues/detail?id=29

Jamon has moved on to using React, but others might still find his patch useful.
https://code.google.com/p/closure-templates/issues/attachmentText?id=29&aid=-6428444581076525520&name=useCommonJsAsyncDef.patch&token=ABZ6GAeKnA2uHc77T5Pca4kZNcsDviSeug%3A1424996967565

--useCommonJsAsyncDef
usage = "When this option is used, each generated JS file with be wrapped with define() command and will specify external callees as dependencies according to the CommonJS asynchronous definition proposal. Use in conjunction with --dependencies"

Found error where declared syntax version 2.0 is not satisfied

I'm getting started following this tutorial: https://developers.google.com/closure/templates/docs/helloworld_js

But I cannot compile the .soy file using command line, I get this error:

java -jar SoyToJsSrcCompiler.jar --outputPathFormat cb.js --srcs cb.soy
Exception in thread "main" com.google.template.soy.base.SoySyntaxException: Found error where declared syntax version 2.0 is not satisfied: In file cb
.soy:2, template ns.templates.cb.cb: Tag {template .cb}: Template is missing SoyDoc.
        at com.google.template.soy.base.SoySyntaxException.createWithoutMetaInfo(SoySyntaxException.java:52)
        at com.google.template.soy.sharedpasses.ReportSyntaxVersionErrorsVisitor.exec(ReportSyntaxVersionErrorsVisitor.java:107)
        at com.google.template.soy.soyparse.SoyFileSetParser.runSingleFileCheckingPasses(SoyFileSetParser.java:322)
        at com.google.template.soy.soyparse.SoyFileSetParser.parseWithVersions(SoyFileSetParser.java:221)
        at com.google.template.soy.soyparse.SoyFileSetParser.parse(SoyFileSetParser.java:173)
        at com.google.template.soy.SoyFileSet.compileToJsSrcFiles(SoyFileSet.java:921)
        at com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:303)
        at com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:243)

here is my Soy file:

{namespace ns.templates.cb}
{template .cb}
  <div>Hello world!</div>
{/template}

Any idea why it doesn't work?

SoyAutoescapeException: Error while re-contextualizing template

This template blows up the compiler

{namespace views.postHtml autoescape="contextual"}

/**
 * @param baseUrl
 * @param path
 */
{template .x}
  <a href='{call .url data="all" /}'>
{/template}

/**
 * @param baseUrl
 * @param path
 */
{template .url}
  {if $baseUrl}{$baseUrl}{/if}/
  {$path}
{/template}

Here's the stack trace:

com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException: In file postHtml.soy:8, template views.postHtml.x: Error while re-contextualizing template views.postHtml.url in context (Context URI NORMAL URI SINGLE_QUOTE START):
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException.createCausedWithoutMetaInfo(SoyAutoescapeException.java:58)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException.createCausedWithNode(SoyAutoescapeException.java:93)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.contextualizeCallee(InferenceEngine.java:633)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.inferCallSite(InferenceEngine.java:601)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.visitCallNode(InferenceEngine.java:245)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitCallBasicNode(AbstractSoyNodeVisitor.java:304)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:110)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:56)
[template-compiler]     at com.google.template.soy.basetree.AbstractNodeVisitor.visitChildren(AbstractNodeVisitor.java:59)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitChildren(AbstractSoyNodeVisitor.java:129)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.visitTemplateNode(InferenceEngine.java:201)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitTemplateBasicNode(AbstractSoyNodeVisitor.java:160)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:66)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.exec(InferenceEngine.java:174)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine.infer(InferenceEngine.java:149)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine.inferTemplateEndContext(InferenceEngine.java:106)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.ContextualAutoescaper.rewrite(ContextualAutoescaper.java:163)
[template-compiler]     at com.google.template.soy.SoyFileSet.doContextualEscaping(SoyFileSet.java:1008)
[template-compiler]     at com.google.template.soy.SoyFileSet.runMiddleendPasses(SoyFileSet.java:990)
[template-compiler]     at com.google.template.soy.SoyFileSet.compileToJsSrcFiles(SoyFileSet.java:924)
[template-compiler]     at com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:303)
[template-compiler]     at com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:243)
[template-compiler] Caused by: com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException: In file postHtml.soy:17, template views.postHtml.url__C33f6: Cannot determine which part of the URL {$path} is in.
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException.createWithoutMetaInfo(SoyAutoescapeException.java:42)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException.createWithNode(SoyAutoescapeException.java:76)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine.getContextAfterEscaping(InferenceEngine.java:862)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine.access$700(InferenceEngine.java:79)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.visitPrintNode(InferenceEngine.java:480)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:87)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:56)
[template-compiler]     at com.google.template.soy.basetree.AbstractNodeVisitor.visitChildren(AbstractNodeVisitor.java:59)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitChildren(AbstractSoyNodeVisitor.java:129)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.visitTemplateNode(InferenceEngine.java:201)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitTemplateBasicNode(AbstractSoyNodeVisitor.java:160)
[template-compiler]     at com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(AbstractSoyNodeVisitor.java:66)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.exec(InferenceEngine.java:174)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine.infer(InferenceEngine.java:149)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine.inferTemplateEndContext(InferenceEngine.java:106)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.hypothesizeContextualization(InferenceEngine.java:712)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.determineContextualization(InferenceEngine.java:662)
[template-compiler]     at com.google.template.soy.parsepasses.contextautoesc.InferenceEngine$ContextPropagatingVisitor.contextualizeCallee(InferenceEngine.java:630)
[template-compiler]     ... 19 more

This is using Closure templates release 2014-04-22.

compiler crashes with integer overflow when evaluating expressions

{namespace examples.overflow}

/**
 * test
 */
{template .test}
  {let $y: 1000 * 1000 * 1000 * 1000 /}
{/template}

Crashes with the following exception:

$ java -jar target/soy-2.5.0-SNAPSHOT-SoyToJsSrcCompiler.jar --outputPathFormat simple.js --srcs hello.soy 
INTERNAL SOY ERROR.
Please open an issue at https://github.com/google/closure-templates/issues with this stack trace and repro steps
java.lang.IllegalStateException: Casting long to integer results in overflow: 1000000000000
    at com.google.common.base.Preconditions.checkState(Preconditions.java:200)
    at com.google.template.soy.data.restricted.IntegerData.integerValue(IntegerData.java:130)
    at com.google.template.soy.data.internalutils.InternalValueUtils.convertPrimitiveDataToExpr(InternalValueUtils.java:66)
    at com.google.template.soy.sharedpasses.opti.SimplifyExprVisitor.attemptPreeval(SimplifyExprVisitor.java:231)
    at com.google.template.soy.sharedpasses.opti.SimplifyExprVisitor.visitExprNode(SimplifyExprVisitor.java:204)

Reproduced with the compiler at head.

This is perfectly valid javascript because numbers are doubles? And in Java, it should convert to double or long?

Relatedly, it's not clear to me why the soy compiler is trying to evaluate the expression at all? This seems like something the Java or JS compiler would be more effective at.

TemplateBasicNode (probably SoyNode) toSourceString prints let statements incorrectly

given this template let statement inside a template
{let $BaseTimestamp : subtract($FromTimestamp, modulo($FromTimestamp, (1000 * 60 * 60 * 24))) /}
when extracting the source from a template in a custom visitor pass with toSourceString, the let statement is rewritten as
{let $BaseTimestamp : subtract($FromTimestamp, modulo($FromTimestamp, (1000 * 60 * 60 * 24)))}
which does not compile properly.

Setting `autoescape` on a template causes the template to silently fail.

We have several templates with an autoescape value set. Including any of these templates in a SoyFileSet causes all templates to fail with com.google.template.soy.tofu.SoyTofuException: Attempting to render undefined template.

An example:

// foo.soy
{namespace foo}

/**
 * Template with contextual autoescape.
 */
{template .manualAutoEscape autoescape="false"}
    Manual AutoEscape
{/template}
// bar.soy
{namespace bar}

/**
 * Hello World
 */
{template .helloWorld}
    Hello World
{/template}
// test.scala
val testFiles = SoyFileSet.builder
   .add(new URL("file:foo.soy"))
   .add(new URL("file:bar.soy"))
   .build
   .compileToTofu

   println(testFiles.newRenderer("foo.manualAutoEscape").render)
   println(testFiles.newRenderer("bar.helloWorld").render)

Both templates fail with Attempting to render undefined template. Removing the autoescape="false" from .manualAutoEscape causes both to succeed.

new Maven artifacts please

Hi folks,

The current artifacts on Maven central are old; 2015-04-10 and 2.5.0-SNAPSHOT. It would be great to get new versions published, because 2015-04-10 has some problems that are already fixed on master.

My preference would be for a named release, because I'd prefer not to depend on a SNAPSHOT version in production

Thanks,
-Brendan

|truncate directive acts on escaped content, but should act on pre-escaped content

{'12"45"'|truncate:6} is printed as 12&... because it acts on the expanded HTMl entities like &quot;
{'12"45"'|truncate:6|escapeHtml} forces ordering and is printed as 12"45" (the HTML source is 12&quot;45&quot;)

I can't see the usefulness of acting on the escaped HTML and it causes artifacts (like ampersands) to appear in your output HTML, so the latter behavior seems more sane by default.

Strict templates in FeaturesUsage failing

The .demoRawTextCommands and .demoDoubleBraces templates are failing when rendered in FeaturesUsage. The templates have ContentKind.TEXT but validation fails as the default template content type is ContentKind.HTML. The failure breaks the build.

This PR explicitly sets the expected content type to ContentKind.TEXT.

[INFO] --- exec-maven-plugin:1.3.2:java (java-features-example) @ soy ---
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
--------------------------------------------------------------------------------
[1. demoComments]
blah blah<br>http://www.google.com<br>
--------------------------------------------------------------------------------
[2. demoLineJoining]
First second.<br><i>First</i>second.<br>Firstsecond.<br><i>First</i> second.<br>Firstsecond.<br>
--------------------------------------------------------------------------------
[3. demoRawTextCommands]
[WARNING] 
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:724)
Caused by: com.google.template.soy.tofu.SoyTofuException: Expected template to be kind="html" but was kind="text": soy.examples.features.demoRawTextCommands
    at com.google.template.soy.tofu.internal.BaseTofu$RendererImpl.enforceContentKind(BaseTofu.java:527)
    at com.google.template.soy.tofu.internal.BaseTofu$RendererImpl.render(BaseTofu.java:499)
    at com.google.template.soy.tofu.internal.BaseTofu$RendererImpl.render(BaseTofu.java:486)
    at com.google.template.soy.examples.FeaturesUsage.execMain(FeaturesUsage.java:147)
    at com.google.template.soy.examples.FeaturesUsage.main(FeaturesUsage.java:91)
    ... 6 more

Kickstart this project properly!

We do not understand why Google is not putting more energy into this project? It was cool, but soon it staled, without any improvements in years!

Please, kickstart this project properly:

  • close old Google code project and put a link to this repo;
  • update official page with new repo link;
  • migrate issues (that make sense) from old repo to this new repo;
  • add README etc.
  • explain the status of this project and future plans.
  • add Maven artifacts
  • think on migrating to gradle

Thank you.

documentation bug: busted github link in index of Closure Templates Google Develoers site

Couldn't find the actual code for the Google Developers Closure Templates page in here for the closure-templates-docs repository.

But there is a busted "project's source code" link in that "How Do I Start" section. It points to "https://github/google/closure-templates/" instead of "https://github.com/google/closure-templates/"

(Also, where is the repo for that page? It says its Apache licensed but it's definitely not in the closure-templates-docs repo.)

map get values doesn't work?

    {let $formattableDays: [
      'MONDAY':    'Monday',
      'TUESDAY':   'Tuesday',
      'WEDNESDAY': 'Wednesday',
      'THURSDAY':  'Thursday',
      'FRIDAY':    'Friday',
      'SATURDAY':  'Saturday',
      'SUNDAY':    'Sunday'
    ]/}

    {$formattableDays['MONDAY']} 

results in an error:

com.google.template.soy.base.SoySyntaxException: In file /Users/mszczap/Devel/mobile/public-search-germany-webapp/build/classes/main/soy/pubse/includes/configJs.soy:55:9, template pubse.includes.configJs: Invalid expression "$formattableDays['MONDAY']": Type [FRIDAY: string, MONDAY: string, SATURDAY: string, SUNDAY: string, THURSDAY: string, TUESDAY: string, WEDNESDAY: string] does not support bracket-access.

Why? How to fix this?

We are using version

com.google.template soy 2015-04-10

rgb()/rgba() CSS color values not supported in filterCssValue

I am running into following error when using rgb(...) or rgba(...) in CSS color values with strict autoescaping.

Uncaught AssertionError: Failure: Bad value rgba(0,0,0,0.6) for |filterCssValue

Testing template:

{namespace test}

{template .item}
    {@param? style: [color: string]}

    <div style="{call .style}{param style: $style /}{/call}">
        test
    </div>
{/template}

{template .style private="true" kind="css"}
    {@param? style: [color: string]}

    {if $style.color}background-color: {$style.color};{/if}
{/template}

To reproduce, it can be called with following JS code:

test.item({
    style = {
        color: 'rgba(0, 0, 0, 0.6)'
    }
}); 

The culprit seems to be this regular expression and in turn this generated JS code.

I can supply PR if interested.

testGenerateExtractedMsgsFile fails. Reason unknown.

Test output on Windows:
testGenerateExtractedMsgsFile(com.google.template.soy.xliffmsgplugin.XliffMsgPluginTest) Time elapsed: 0.011 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<..." encoding="UTF-8"?>[




Moscow
Our secret location.


Camels
We really mean dromedary.
dromedary


Moose also says .
Tells what a moose says.


Cow says .
Tells what a cow says.


Camels
Ok, we mean camel here.
camel




]

but was:<..." encoding="UTF-8"?>[




Moscow
Our secret location.


Camels
We really mean dromedary.
dromedary


Moose also says .
Tells what a moose says.


Cow says .
Tells what a cow says.


Camels
Ok, we mean camel here.
camel



]

Note:
The difference between the expected and result is the closing ']' at the end!

closure-templates at HEAD throws errors on any css

Create a template like this:

/**
 * @param css
 */
{template .stylesheet}
  <style>
    {$css}
  </style>
{/template}

call it

my.stylesheet({css: 'body { color: blue; }'})

Result: error:
AssertionError: Failure: Bad value body { color: blue; } for |filterCssValue
at new goog.asserts.AssertionError (/Users/nick/git/soynode/node_modules/obvious-closure-library/closure/goog/asserts/asserts.js:62:20)
at Object.goog.asserts.fail (/Users/nick/git/soynode/node_modules/obvious-closure-library/closure/goog/asserts/asserts.js:176:32)
at Object.soy.esc.$$filterCssValueHelper (/Users/nick/git/soynode/node_modules/closure-templates/soyutils_usegoog.js:2256:18)
at Object.soy.$$filterCssValue (/Users/nick/git/soynode/node_modules/closure-templates/soyutils_usegoog.js:1495:18)

can't access to protected property on 'soyutils_usegoog.js'

I used soyutil_usegoog.js file , implement on my project by closure lib.
it's error on line 354 ,394,835,886

Access to protected property content of goog.soy.data.SanitizedContent not allowed here.

    result.content = String(content);

how to fix on this error? Thank for advice

SoyAutoescapeException: Messages are not supported in this context, because it would mean asking translators to write source code

We've been using the 2012 version of Closure Templates for years and we've recently been trying to upgrade to the latest version to take advantage of new features like static typing. Unfortunately, running the new version we get this error

SoyAutoescapeException: In file /home/chris/Programming/kinja-mantle/app/views/closure/tiger/messages.soy:454:81, template tiger.messages.tokenCallFailed: Messages are not supported in this context, because it would mean asking translators to write source code: (Context URI NORMAL URI DOUBLE_QUOTE START)

The relevant template is:

452 {template .tokenCallFailed}
453    {msg desc="Success box message - token obtain failed"}Post failed to save. Please check your network connection and try again.{/msg}
454    <a class="icon icon-question-circle hover-icon icon-append help-link" href="{msg desc="Kinja Help URL - Token call failed"}http://help.gawker.com/customer/portal/articles/1794410-why-am-i-receiving-a-post-save-error-{/msg}" target="_blank"></a>
455 {/template}

We use this to send users to a different, external page depending on the language they speak.

Upgrade to Guice 4.0

Closure templates cannot be used alongside other projects that use Google Guice and have upgraded to 4.0 due to breaking changes in the library. It would be nice if Closure Templates could release a new version compile against Guice 4.0.

Remove generated stuff from source control

This repo contains a lot of generated documentation (two sets of JavaDocs?) and code that is built from upstream. This stuff creates noise in the commit logs and causes churn when synchronizing from Google's internal sources. I also suspect they are rarely useful. Would anyone mind if we removed them?

Cannot build generated-soyutils

After cloning the HEAD of the repo, I cannot build the generated-soyutils target. It errors out with taskdef class com.google.template.soy.shared.internal.GenerateSoyUtilsEscapingDirectiveCode cannot be found.

$ ant generated-soyutils
Buildfile: /path/lib/closure-templates/build.xml

compile:

generated-soyutils:

BUILD FAILED
/path/lib/closure-templates/build.xml:99: taskdef class com.google.template.soy.shared.internal.GenerateSoyUtilsEscapingDirectiveCode cannot be found
 using the classloader AntClassLoader[/path/lib/closure-templates/java/lib/aopalliance.jar:/path/lib/closure-templates/java/lib/args4j-2.0.17.jar:/path/lib/closure-templates/java/lib/cglib-nodep-2.2.2.jar:/path/lib/closure-templates/java/lib/easymock-3_0.jar:/path/lib/closure-templates/java/lib/guava-14.0.jar:/path/lib/closure-templates/java/lib/guice-3.0.jar:/path/lib/closure-templates/java/lib/guice-assistedinject-3.0.jar:/path/lib/closure-templates/java/lib/guice-multibindings-3.0.jar:/path/lib/closure-templates/java/lib/icu4j-51_1.jar:/path/lib/closure-templates/java/lib/javax.inject.jar:/path/lib/closure-templates/java/lib/jsr305.jar:/path/lib/closure-templates/java/lib/junit.jar:/path/lib/closure-templates/java/lib/objenesis-1_2.jar:/path/lib/closure-templates/java/lib/rhino-1.7_r2.jar:/path/lib/closure-templates/build/classes]

Add Go support

This is just a wishlist type request (the Go implementation out there is out of date)

Add Python support

Migrated from https://code.google.com/p/closure-templates/issues/detail?id=1


Reported by dinoboff, Nov 8, 2009
It would be great to be able to compile Soy templates to Python.

Project Member  #1 kai.huang
Sorry, there are no current plans to add Python support.
Status: WontFix 
Labels: ­Type­Defect Type­Enhancement 
#2 dolapo

would you take outside contributions for this?

Project Member  #3 kai.huang
If you were to actually write a high quality backend implementation of Soy for Python,
with support for all the current features, then I'm sure we would be happy to add it to
the project. The main problem would be that going forward, we wouldn't have the
resources to maintain it when we add new features to the other backends, and it may even
break if we make certain large changes (probably not often though). But if you're
willing to maintain the Python backend when it gets broken or to implement key new
features, I'd say go for it!
PS. I'm going to be on leave for most of Q3, so it would be Q4 before it can be added to
the main project.
PPS. I think I recognize you as a Xoogler? Is that right?
#4 mark@testing­software.org

This is confusing to me. I could not find a Soy for Python. Is it that I looked at the
wrong places? Is dolapo or somebody else still working on a port?
Is there some research / dialog available on the benefits of having server side
templates in an Ajax application. I think mainly the data exchange will be XHR but I can
think of cases where a server side template could be helpful like creation of the
initial html page.
#5 [email protected]

I think there are some 3rd party Python implementations of Soy. Obviously, I can't vouch
for their accuracy in behavior and features.
I'll also keep an eye out for engineers inside Google who want to add a Python backend
to Soy.
#6 lalinsky

The issue is closed now, but just FYI, I'm working on adding Python backend at
https://bitbucket.org/lalinsky/closure-templates/overview
Should I submit a patch when I'm done? Would an external contribution be accepted?
#7 lalinsky

https://oxygene.sk/2014/03/closure-templates-soy-for-python/
#8 [email protected]

Wow, awesome! Thanks for this! This is actually something someone else was looking at
internally... I didn't catch a glimpse of this until now. I'm going to touch base with
the engineer who has been working on this.
One very unfortunate thing is that we been far too lazy in updating the open source
version of Soy, so it's likely there will be a large version gap; in the next version we
have much better support for strict autoescaping, for example. Once we get our open
source version up to date (I can't guarantee when that will be unfortunately) we can see
whether it is still convenient to patch, or whether the person working on it internally
is close enough to something workable that it makes sense just to finish that.
Thanks again! This is amazing!

Python: class SanitizedContent raises DeprecationWarning

I just started using the Python implementation for the first time today. Firstly - thanks!

As I always run my tests with DeprecationWarnings turned into errors I found that the __new__ method of class SanitizedContent (part of the python/sanitize.py file) passes arguments on to object.__new__(). This is deprecated in Python (since 2.6 I think) - http://bugs.python.org/issue1683368.

The change required is simple and causes no side effects:

python/sanitize.py
Change from:

class SanitizedContent(object):
  content_kind = None

  def __new__(cls, *args, **kwargs):
    if cls is SanitizedContent or not cls.content_kind:
      raise TypeError('SanitizedContent cannot be instantiated directly. '
                      'Instantiate a child class with a valid content_kind.')
    return object.__new__(cls, *args, **kwargs)

To:

class SanitizedContent(object):
  content_kind = None

  def __new__(cls, *args, **kwargs):
    if cls is SanitizedContent or not cls.content_kind:
      raise TypeError('SanitizedContent cannot be instantiated directly. '
                      'Instantiate a child class with a valid content_kind.')
    return object.__new__(cls)

I'll create a pull request a bit later.

Create a formatDateTime directive

It'd be good to have a native directive to format a timestamp, delegating to standard date formatting implementations such as SimpleDateFormat (Java) and Date.toLocaleDateString (JS). A possible interface could be:

{timestampMillis|formatDateTime:locale,"short"}

Return compilation errors from compileToTofu

When developing templates, it would be helpful to get the template, filename, line number, and error message for any compilation errors. That allows me to show the detailed error message along with the line of source code in context to the developer. I do that today by parsing the SoySyntaxException's message, after extracting the original exception from the suppressed frames. Luke suggested that this use case could be better supported.

running mvn compile twice without a clean causing duplicate classes

The current build breaks when mvn compile is run twice with no mvn clean between. I've not been able to figure out what is going wrong. I did find a hack that works where you add -proc:none to the javac compiler arguments and also add an old maven-processor-plugin to the pom, but that seems.. well, silly.

Here's the errors:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project soy: Compilation failure: Compilation failure:
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/shared/AutoValue_SoyAstCache_VersionedFile.java:[9,7] duplicate class: com.google.template.soy.shared.AutoValue_SoyAstCache_VersionedFile
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_ControlFlow_IfBlock.java:[7,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_ControlFlow_IfBlock
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_FieldRef.java:[8,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_FieldRef
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jssrc/internal/AutoValue_HelperFunctions_FieldAccessStrategy.java:[7,7] duplicate class: com.google.template.soy.jssrc.internal.AutoValue_HelperFunctions_FieldAccessStrategy
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/soytree/AutoValue_ForNode_RangeArgs.java:[9,7] duplicate class: com.google.template.soy.soytree.AutoValue_ForNode_RangeArgs
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/soytree/AutoValue_TemplateDelegateNode_DelTemplateKey.java:[7,7] duplicate class: com.google.template.soy.soytree.AutoValue_TemplateDelegateNode_DelTemplateKey
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/soytree/AutoValue_CallNode_DataAttribute.java:[8,7] duplicate class: com.google.template.soy.soytree.AutoValue_CallNode_DataAttribute
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_ConstructorRef.java:[10,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_ConstructorRef
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_MethodRef.java:[10,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_MethodRef
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/msgs/restricted/AutoValue_SoyMsgPart_Case.java:[8,7] duplicate class: com.google.template.soy.msgs.restricted.AutoValue_SoyMsgPart_Case
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/conformance/AutoValue_ConformanceInput.java:[10,7] duplicate class: com.google.template.soy.conformance.AutoValue_ConformanceInput
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_TypeInfo.java:[8,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_TypeInfo
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_ClassData.java:[8,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_ClassData
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_CompiledTemplateMetadata.java:[8,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_CompiledTemplateMetadata
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_DetachState_ReattachState.java:[8,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_DetachState_ReattachState
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_VariableSet_VarKey.java:[7,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_VariableSet_VarKey
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_VariableSet_SaveRestoreState.java:[7,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_VariableSet_SaveRestoreState
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_SoyNodeCompiler_CompiledRangeArgs.java:[8,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_SoyNodeCompiler_CompiledRangeArgs
[ERROR] /Users/jmhodges/src/github.com/google/closure-templates/target/generated-sources/annotations/com/google/template/soy/jbcsrc/AutoValue_LazyClosureCompiler_ParentCapture.java:[7,7] duplicate class: com.google.template.soy.jbcsrc.AutoValue_LazyClosureCompiler_ParentCapture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.