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

Exposes core_id in the configuration of an HttpServer #534

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Angelo13C
Copy link
Contributor

No description provided.

src/http/server.rs Outdated Show resolved Hide resolved
@ivmarkov
Copy link
Collaborator

Also if you could also update the Changelog as the new PR template suggests? In section Breaking, as you are adding a new field to an existing struct which is not marked with non_exhaustive.

CHANGELOG.md Show resolved Hide resolved
@@ -141,7 +145,7 @@ impl From<&Configuration> for Newtype<httpd_config_t> {
))]
task_caps: (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT),
stack_size: conf.stack_size,
core_id: i32::MAX,
core_id: conf.core.map(|core| core.into()).unwrap_or(i32::MAX),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This I'm not sure about because I don't know much about all this, but this should be a core still, no? Shouldn't you do something like this?

conf.core.map(|core| core.into()).unwrap_or(Core::Core0)

I'm not sure but it feels like i32::MAX would always crash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, core_id is an i32, and i32::MAX works perfectly fine.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 6, 2025

This PR looks OK now, but merging it has to wait a bit, because adding a new field to the conf struct is backwards-incompatible (strictly speaking).

Fortunately, it is only a matter of a few days. Turns out, we need to release a new non-patch esp-idf-svc any way really soon, because of the new embassy-time-driver API which is also not backwards-compatible.

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.

3 participants