Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depswriter does not produce the new deps format (i.e. module support) #382

Closed
pstjvn opened this issue Nov 27, 2014 · 7 comments
Closed

Comments

@pstjvn
Copy link

pstjvn commented Nov 27, 2014

depswriter.py does not produce the new dependency format needed for the module support, thus it prevent the usage of modules in third party code.

Please push the needed updates to the open source repo.

Thanks.

@MatrixFrog
Copy link
Contributor

I don't think anyone uses depswriter.py within Google, so (if I remember correctly) we want to try and get rid of it, but I don't know if we have any suitable replacement for open-source users.

@pstjvn
Copy link
Author

pstjvn commented Dec 1, 2014

So basically this is a no-op for open source then?

@MatrixFrog
Copy link
Contributor

At least for the moment, yes :(

@concavelenz
Copy link
Contributor

I thought I updated this. Are you sure you are using the latest?
On Nov 27, 2014 6:44 AM, "pstjvn" notifications@github.com wrote:

depswriter.py does not produce the new dependency format needed for the
module support, thus it prevent the usage of modules in third party code.

Please push the needed updates to the open source repo.

Thanks.


Reply to this email directly or view it on GitHub
#382.

@pstjvn
Copy link
Author

pstjvn commented Dec 4, 2014

peterj | Jobs: 0 | @work:~/Documents/Projects/closure/library
$ git pull
Already up-to-date.

peterj | Jobs: 0 | @work:~/Documents/Projects/closure/apps/material
$ python ../../library/closure/bin/build/depswriter.py --root_with_prefix="js ../../../apps/mobiletv/js"
// This file was autogenerated by ../../library/closure/bin/build/depswriter.py.
// Please do not edit.
goog.addDependency('../../../apps/mobiletv/js/app.js', ['app'], ['material.app']);
goog.addDependency('../../../apps/mobiletv/js/m60.js', ['m60.weather'], ['goog.Promise', 'goog.json', 'goog.labs.net.xhr']);
goog.addDependency('../../../apps/mobiletv/js/matetial.js', ['material.app'], ['pstj.material.decorator']);

I am not 100% sure what the new format should be, but this looks like it is not (missing last argument?)

@concavelenz
Copy link
Contributor

drat, it was missed, I was thinking about something else. Thanks for
reporting this, the fix is trivial and I have it out for review. If you
want to patch it locally, replace _GetDepsLine with:

def _GetDepsLine(path, js_source):
"""Get a deps.js file string for a source."""

provides = sorted(js_source.provides)
requires = sorted(js_source.requires)
module = 'true' if js_source else 'false'

return 'goog.addDependency('%s', %s, %s, %s);\n' % (
path, provides, requires, module)

On Thu, Dec 4, 2014 at 2:39 PM, pstjvn notifications@github.com wrote:

peterj | Jobs: 0 | @work:~/Documents/Projects/closure/library
$ git pull
Already up-to-date.

peterj | Jobs: 0 | @work:~/Documents/Projects/closure/apps/material
$ python ../../library/closure/bin/build/depswriter.py --root_with_prefix="js ../../../apps/mobiletv/js"
// This file was autogenerated by ../../library/closure/bin/build/depswriter.py.
// Please do not edit.
goog.addDependency('../../../apps/mobiletv/js/app.js', ['app'], ['material.app']);
goog.addDependency('../../../apps/mobiletv/js/m60.js', ['m60.weather'], ['goog.Promise', 'goog.json', 'goog.labs.net.xhr']);
goog.addDependency('../../../apps/mobiletv/js/matetial.js', ['material.app'], ['pstj.material.decorator']);

I am not 100% sure what the new format should be, but this looks like it
is not (missing last argument?)


Reply to this email directly or view it on GitHub
#382 (comment)
.

@pstjvn
Copy link
Author

pstjvn commented Dec 5, 2014

Thank you

concavelenz added a commit that referenced this issue Dec 17, 2014
Fixes #382 on github
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81435962
redforks pushed a commit to redforks/closure-library that referenced this issue Dec 26, 2014
Fixes google#382 on github
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81435962
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants