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

Fix compilation on Windows once more #232

Merged
merged 2 commits into from
Jan 22, 2021
Merged

Conversation

skreborn
Copy link
Contributor

@skreborn skreborn commented Jan 22, 2021

Woop-woop! That's the sound of da Windows police!

The pprof crate is unfortunately not compatible with Windows as of now, and thus its inclusion prevents the library from being built even if the relevant code is never accessed. It is only "used" in rumqttd/src/bin.rs, and even then it really isn't, so it is not what you would necessarily call essential.

This change simply gets rid of the offending piece of code and its dependency. Rejoice, for this lets the library be built on Windows once more!

@tekjar
Copy link
Contributor

tekjar commented Jan 22, 2021

Instead of removing, can we instead feature gate pprof with !cfg mvsc?

@tekjar
Copy link
Contributor

tekjar commented Jan 22, 2021

I thing a profile feature flag also makes sense

@skreborn
Copy link
Contributor Author

Instead of removing, can we instead feature gate pprof with !cfg mvsc?

That would've been my first approach, but since it was commented out and not doing anything, I've instead opted to remove it completely. If you'd like, I can put it back (either commented or uncommented), but being unable to compile and run the binary with profiling on, I wasn't feeling very confident just uncommenting it, fearing that it might break on a Linux.

Is there a reason it was commented out?

@tekjar
Copy link
Contributor

tekjar commented Jan 22, 2021

I think it was commented out by mistake while I was checking throughput difference with and without profiling on

@skreborn
Copy link
Contributor Author

I've re-added the profiling code for non-Windows targets. I've tested it and it builds and runs successfully on both Windows and Linux - and generates the profiling data successfully on the latter.

@tekjar tekjar merged commit de5ec81 into bytebeamio:master Jan 22, 2021
@tekjar
Copy link
Contributor

tekjar commented Jan 22, 2021

Thanks!! :)

carlocorradini pushed a commit to carlocorradini/rumqtt that referenced this pull request Aug 3, 2023
* Fix compilation on Windows once more

* Re-add profiling support for non-Windows targets
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

Successfully merging this pull request may close these issues.

2 participants