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

How is the DEPRECATED indication handled ? #210

Open
fred-r opened this issue Feb 13, 2023 · 6 comments
Open

How is the DEPRECATED indication handled ? #210

fred-r opened this issue Feb 13, 2023 · 6 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@fred-r
Copy link
Contributor

fred-r commented Feb 13, 2023

Today in the specs, some items are tagged as DPRECATED like the Dfamily for the conditions (only):

Dfamily* DEPRECATED** Specifies the device family name (for example: STM32F2 Series).

It seems that this criteria is not supported any more.
So, is it more than deprecated, is it removed ?

@jkrech
Copy link
Member

jkrech commented Feb 14, 2023

@edriouk can you confirm that anything D* except Dvendor and Dname is actually no longer supported in conditions in the RTE Model?
Looking at the currently published packs, there is many using Dfamily and DsubFamily as well as Dvariant as part of conditions.

@edriouk
Copy link

edriouk commented Feb 14, 2023

We still set Dfamily and DsubFamily for filtering, however they should be completely deprecated.
RteModel needs to be upgraded with corresponding validation to issue an error.
Dvariant is no longer supported in conditions. If a device variant is selected, Dname filtering attribute is set to device's Dvariant value.
Other D* properties such as Dfpu, Dmpu, Dendian, etc. are continued to be supported.

@jkrech jkrech added bug Something isn't working documentation Improvements or additions to documentation labels Feb 14, 2023
@jkrech
Copy link
Member

jkrech commented Feb 14, 2023

The meaning of "DEPRECATED" must be different from
a) removed = ignored (dangerous)
b) removed = causing an error => breaking change

@fred-r
Copy link
Contributor Author

fred-r commented Feb 15, 2023

To me we should be even more precise than this:

deprecated: developers are discouraged from using it, a warning is raised by the tool when encountering it and there is a porting period (say 18 months)

At the end of the porting period, we just remove the element from the spec (logged in the change log).

If we do not do that DEPREACTED will stay forever and depending on implementation it may or may not be supported properly...

@edriouk
Copy link

edriouk commented Feb 16, 2023

I think we need to make use of schema version in the tools.
A tool can define a range of schema versions it supports
If the tool reads a pdsc with schema version outside the supported range, then warning or error should be issued. Semantic version rules can be used to decide about severity.
In particular, removing deprecated elements should be reflected by the major version change => error.
Additionally I would put current PACK.xsd version that is seen during tool build.

BTW, this mechanism could also help in case of unknown elements and attributes.
Open-CMSIS-Pack/devtools#744

@ReinhardKeil
Copy link
Collaborator

Actions are:

  • create a list of deprecated features
  • classify the impact (with a note) of deprecated features into:
    -- affects build
    -- affects web views
    -- affects supportive tools (such as pack installer cannot access an old example)

After this list is available revisit this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants