Bug 1906992 Comment 35 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Brendan Abolivier [:babolivier] from comment #32)
> (In reply to Henri Sivonen (:hsivonen) from comment #29)
> > For the compiler to optimize things out in the m-c case, checking against a string seems problematic.
> > 
> > I suggest introducing a `mailnews` Cargo feature on `idna_glue` and setting the Cargo feature on `idna_glue` from https://searchfox.org/comm-central/source/rust/gkrust/Cargo.toml .
> 
> I think that could work. It would need fiddling with our automation, since we generate our `gkrust/Cargo.toml` file to keep up to date with the dependencies from m-c, but I have a solution for this in the patch above (https://phabricator.services.mozilla.com/D216282).

It doesn't have to be that file. Any c-c Cargo.toml that adds a dependency on `idna_glue` and sets the `mailnews` feature should work.

> Henri, since you've probably got more knowledge and context on/around `idna_glue` than I do, would you be able to take care of this special casing for `Local Folders` and `smart folders`? No worries if not, I can look into it in this case.

I uploaded a completely untested patch. (Please test that the equality comparisons actually work!) I'm unlikely to time to work on the patch more this week, so please take the patch and edit as needed.

In the patch, I'm assuming that existing code still expects the IDNA code to change "Local Folders" to lower case, but if not, then you can edit the "Local Folders" cases to look more like the "smart mailboxes" cases.
(In reply to Brendan Abolivier [:babolivier] from comment #32)
> (In reply to Henri Sivonen (:hsivonen) from comment #29)
> > For the compiler to optimize things out in the m-c case, checking against a string seems problematic.
> > 
> > I suggest introducing a `mailnews` Cargo feature on `idna_glue` and setting the Cargo feature on `idna_glue` from https://searchfox.org/comm-central/source/rust/gkrust/Cargo.toml .
> 
> I think that could work. It would need fiddling with our automation, since we generate our `gkrust/Cargo.toml` file to keep up to date with the dependencies from m-c, but I have a solution for this in the patch above (https://phabricator.services.mozilla.com/D216282).

It doesn't have to be that file. Any c-c Cargo.toml that adds a dependency on `idna_glue` and sets the `mailnews` feature should work.

> Henri, since you've probably got more knowledge and context on/around `idna_glue` than I do, would you be able to take care of this special casing for `Local Folders` and `smart folders`? No worries if not, I can look into it in this case.

I uploaded a completely untested patch. (Please test that the equality comparisons actually work!) I'm unlikely to have time to work on the patch more this week, so please take the patch and edit as needed.

In the patch, I'm assuming that existing code still expects the IDNA code to change "Local Folders" to lower case, but if not, then you can edit the "Local Folders" cases to look more like the "smart mailboxes" cases.

Back to Bug 1906992 Comment 35