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

dts: Move vendor-specific dtsi to dedicated folder #84399

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

decsny
Copy link
Member

@decsny decsny commented Jan 22, 2025

Move all the vendor-specific dtsi files that were in dts/common to a new folder under dts/ designated for vendor-specific files, since they are not common at all, except for one vendor.

Change MAINTAINERS.yml to reflect the moving of the files.

The purpose of this change is mainly so that I don't have to keep adding files-exclude entries to the DT maintainer area, since DT maintainers do not want to review these vendor files changes.

Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

This is a breaking change for all out of tree users

@decsny
Copy link
Member Author

decsny commented Jan 23, 2025

This is a breaking change for all out of tree users

So do you not want to do it? Since it's mostly an aesthetic change I'm not gonna push for it. Although I don't think it's the most horrible thing to break, the error will just be like "file not found" from the preprocessor and not hard to fix

Personally though I think the fact that the common/ part of the path was being used is not great, it makes those files too coupled to the directory structure. It wasn't even necessary, you can include those files without the common/ part of the path already, which is already done in many places in tree for these files, and I didn't have to change those, so I think these in tree files needed to be changed anyways and out of trees should do the same

@nordicjm
Copy link
Collaborator

This is a breaking change for all out of tree users

So do you not want to do it? Since it's mostly an aesthetic change I'm not gonna push for it. Although I don't think it's the most horrible thing to break, the error will just be like "file not found" from the preprocessor and not hard to fix

Personally though I think the fact that the common/ part of the path was being used is not great, it makes those files too coupled to the directory structure. It wasn't even necessary, you can include those files without the common/ part of the path already, which is already done in many places.

Fine for doing it, makes things neater, but this is a breaking change with no deprecation so https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html#introducing-breaking-api-changes sort of applies (plus needs something in migration guide)

@decsny
Copy link
Member Author

decsny commented Jan 23, 2025

This is a breaking change for all out of tree users

So do you not want to do it? Since it's mostly an aesthetic change I'm not gonna push for it. Although I don't think it's the most horrible thing to break, the error will just be like "file not found" from the preprocessor and not hard to fix
Personally though I think the fact that the common/ part of the path was being used is not great, it makes those files too coupled to the directory structure. It wasn't even necessary, you can include those files without the common/ part of the path already, which is already done in many places.

Fine for doing it, makes things neater, but this is a breaking change with no deprecation so https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html#introducing-breaking-api-changes sort of applies (plus needs something in migration guide)

I'm going to be honest, my judgement says that removing one of the two ways to reference some specific files in an #include directive does not need to go through API lifecycle , but I can agree with putting it in migration guide. I am open to opinions from release team about the former . @kartben

Also I think if we wanted to have a deprecation phase for allowing the common/ prefix then that would require having the file in two places which is IMO much worse than a tiny build error

@decsny decsny force-pushed the dts_common_vendor_folder branch from d8a1ee8 to d9b823a Compare February 4, 2025 20:20
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Feb 4, 2025
@decsny decsny force-pushed the dts_common_vendor_folder branch 2 times, most recently from d03743b to cac47b3 Compare February 11, 2025 17:54
@decsny decsny requested a review from mbolivar February 11, 2025 17:55
@mbolivar
Copy link
Contributor

With my maintainer hat on, I can see this is a reasonable cleanup. But with my user hat on, I hate the senseless churn. I agree with @decsny that we haven't ever settled the question that DTSI is API, but we also haven't definitively said it's "not API" and from a user's perspective it sure walks and quacks like an API.

Is the benefit gained by the cleanup really worth breaking all these users' boards without even so much as a deprecation? It feels to me like the effort required to write and test a script that has a preprocessor warning and then includes the new location could be measured in a few hours, and it would definitely save way more than a few hours of total user time, so I think it's reasonable to ask for.

@decsny
Copy link
Member Author

decsny commented Feb 11, 2025

With my maintainer hat on, I can see this is a reasonable cleanup. But with my user hat on, I hate the senseless churn. I agree with @decsny that we haven't ever settled the question that DTSI is API, but we also haven't definitively said it's "not API" and from a user's perspective it sure walks and quacks like an API.

Is the benefit gained by the cleanup really worth breaking all these users' boards without even so much as a deprecation? It feels to me like the effort required to write and test a script that has a preprocessor warning and then includes the new location could be measured in a few hours, and it would definitely save way more than a few hours of total user time, so I think it's reasonable to ask for.

Personally, I think it's reasonable to just make the change. Updating Zephyr versions unfortunately always comes with a mega amount of hassles in my experience (I have had to do a few version updates of a fork), and speaking from experience, one #include directive having a "not found" error is extremely trivial in the grand scheme of doing a version update for a board. Especially now that we have the migration guide which is exactly for situations like this. I didn't have the migration guide when I had to update the version of a fork in the past a few times, would have been nice to have something like that.

@decsny decsny requested a review from nordicjm March 20, 2025 16:29
@decsny decsny force-pushed the dts_common_vendor_folder branch from cac47b3 to 9116876 Compare March 20, 2025 22:20
nordicjm
nordicjm previously approved these changes Mar 21, 2025
Comment on lines 127 to 129
* Many of the vendor-specific and arch-specific files that were in dts/common have been moved
to more specific locations. Therefore, any dts files which ``#include <common/some_file.dtsi>``
a file from in the zephyr tree will need to be changed to just ``#include <some_file.dtsi>``.
Copy link
Collaborator

Choose a reason for hiding this comment

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

needs to go to 4.2 migration guide

@decsny decsny requested review from rruuaanng and removed request for jaz1-nordic March 25, 2025 23:31
@decsny decsny force-pushed the dts_common_vendor_folder branch from 9116876 to ce7283b Compare March 25, 2025 23:34
rruuaanng
rruuaanng previously approved these changes Mar 26, 2025
Copy link
Collaborator

@rruuaanng rruuaanng left a comment

Choose a reason for hiding this comment

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

Looks good. Although there are quite a few files to move, I think it's worth it.

mbolivar
mbolivar previously approved these changes Mar 28, 2025
@mbolivar
Copy link
Contributor

@decsny looks like there are some conflicts to resolve

@decsny decsny dismissed stale reviews from mbolivar and rruuaanng via f510275 April 2, 2025 15:17
@decsny decsny force-pushed the dts_common_vendor_folder branch from ce7283b to f510275 Compare April 2, 2025 15:17
@decsny decsny assigned mbolivar and unassigned rerickson1 Apr 2, 2025
Move all the vendor-specific dtsi files that were in dts/common to a
new folder under dts/ designated for vendor-specific files,
since they are not common at all, except for one vendor.

Change MAINTAINERS.yml to reflect the moving of the files.

Update migration guide for this change.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
@decsny decsny force-pushed the dts_common_vendor_folder branch from f510275 to e90f271 Compare April 3, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants