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

Encoder-only code still contains writer import #712

Closed
joscha opened this issue Mar 22, 2017 · 2 comments
Closed

Encoder-only code still contains writer import #712

joscha opened this issue Mar 22, 2017 · 2 comments

Comments

@joscha
Copy link

joscha commented Mar 22, 2017

protobuf.js version: 6.6.5

When using the CLI with these options:

pbjs \
    --target=static-module \
    --wrap commonjs \
    --no-create \
    --no-encode \
    --no-verify \
    --no-convert \
    --no-delimited \
    --out decoder.js \
    ./my.proto

I expect to end up with a file that only contains references to anything that is needed to decode messages, however the file ends up having an unused reference to $protobuf.Writer:

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

I searched a bit in the code and could not actually find the place where it calculates the needed dependencies. If you point me in the right direction I am happy to contribute a fix.

@dcodeIO
Copy link
Member

dcodeIO commented Mar 22, 2017

Should be fixed in master. Feel free to reopen if there are any remaining issues!

@dcodeIO dcodeIO closed this as completed Mar 22, 2017
@joscha
Copy link
Author

joscha commented Mar 23, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants