Git Product home page Git Product logo

Comments (5)

MarkusBordihn avatar MarkusBordihn commented on May 2, 2024

Thanks for your report protobuf (https://github.com/google/protobuf) is currently not implemented, because its requires an protobuf compiler.

But we will try to add this in the next version.

from closure-builder.

sgammon avatar sgammon commented on May 2, 2024

I understand, and that's okay - I'm building my protobufs elsewhere. I have them in commonjs, browser, es6 and closure forms already.

The problem is, when I try to use them from closure-builder, I encounter the above issues.

Thank you for writing back. Is there anything I can do to fix this? Perhaps compile my protos differently?

from closure-builder.

sgammon avatar sgammon commented on May 2, 2024

@MarkusBordihn: it seems most of my builds get this after enabling debug and trace:

For building my protos only:

Set loglevel to trace
Get Build configuration for goog.protos
Type: javascript
Closure namespace: 
Require ECMAScript6: false
Require closure export: false
Require closure library: false
Require soy i18n: false
Require soy library: false
License file: src/app/license.txt
[...]

For building the protos with my app:

Set loglevel to trace
Get Build configuration for bloombox.dashboard
Type: CLOSURE
Closure namespace: 
Require ECMAScript6: true
Require closure export: true
Require closure library: false
Require soy i18n: false
Require soy library: false
License file: src/app/license.txt

It is still not deciding to include the closure library.

from closure-builder.

sgammon avatar sgammon commented on May 2, 2024

By the way, I am using protojs compiled such that it outputs in the following manner, just so you have an idea how I am using Closure here with protojs:

/**
 * @fileoverview
 * @enhanceable
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

goog.exportSymbol('proto.base.ProductKey', null, global);

/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.base.ProductKey = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.base.ProductKey, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.base.ProductKey.displayName = 'proto.base.ProductKey';
}

[...]

from closure-builder.

sgammon avatar sgammon commented on May 2, 2024

i have fixed this for now by simply tricking closure-builder into including goog.ui, by including some token in it (in a goog.require) that mentions goog.ui

i think in my case i am importing some static property or CSS class or something. simply doing that fixes the issue via side effects

from closure-builder.

Related Issues (7)

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.