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

Compile error: no merge_from_str in text_format #382

Closed
bcoopers opened this issue Jan 28, 2019 · 2 comments
Closed

Compile error: no merge_from_str in text_format #382

bcoopers opened this issue Jan 28, 2019 · 2 comments

Comments

@bcoopers
Copy link

I'm using version 2.2.5 from Cargo, if I do any of the following:

use protobuf::text_format::print_to_string;
use protobuf::text_format::print_to;
use protobuf::text_format::fmt;
use protobuf::text_format::quote_escape_bytes;

they all work fine, however if I do:

use protobuf::text_format::merge_from_str;

I get compile error:

error[E0432]: unresolved import protobuf::text_format::merge_from_str
--> src/main.rs:10:5
|
10 | use protobuf::text_format::merge_from_str;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no merge_from_str in text_format

@bcoopers
Copy link
Author

I went and viewed my internal crates.io cache of the source code and it looks like it's still using the version from May when text_format was a single.rs file rather than a directory

9e86dcd#diff-8c833373a7f87fdcea0bb6eba3fbfcfe

Any way we can request the current functionality be released on crates.io?

@stepancheg
Copy link
Owner

Text format is implemented using reflection.

Reflection for mutability is not implemented in the stable 2.x branches.

And porting this change to stable branch is either impossible or very hard without breaking backward compatibility.

So the easiest way to fix it is to release version 3.

The major drawback against releasing version 3 is the fact that version 2 was released just 7 months ago.

And also I have some uncertainties about APIs in version 3. E. g. I would really reduce generated code size (see #339) as a feature of version 3, but I don't yet know how to do it.

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

2 participants