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

Comments

Projects
None yet
2 participants
@joscha

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 added a commit that referenced this issue Mar 22, 2017

@dcodeIO dcodeIO added the enhancement label Mar 22, 2017

dcodeIO added a commit that referenced this issue Mar 22, 2017

@dcodeIO

This comment has been minimized.

Owner

dcodeIO commented Mar 22, 2017

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

@dcodeIO dcodeIO closed this Mar 22, 2017

@joscha

This comment has been minimized.

joscha commented Mar 23, 2017

Thanks!

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