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

coding_standard.md: Relax warning as error on release (opensource) #2

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

Conversation

rzr
Copy link
Contributor

@rzr rzr commented Feb 20, 2025

This is a "user oriented" best practice used in many FLOSS projects. Fixing at least one supported env is good, but maybe not enough, extending support can help but will it scale?

Reality of sofware engineering is that software integration is a moving science, constraints are evolving over space and time. We can't anticipate (future) breakage,
this change can mitigate the annoyance and maximize user adoption, help integrators and ease software maintenance.

The alternative option, would be to wait user(s) to complain and provide support for the desired env in an acceptable time frame.

This is a "user oriented" best practice used in many FLOSS projects.
Fixing at least one supported env is good, but maybe not enough,
extending support can help but will it scale?

Reality of sofware engineering is that software integration
is a moving science, constraints are evolving over space and time.
We can't anticipate (future) breakage,
this change can mitigate the annoyance and maximize user adoption,
help integrators and ease software maintenance.

The alternative option, would be to wait user(s) to complain
and provide support for the desired env in an acceptable time frame.

Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
@conq
Copy link
Contributor

conq commented Feb 20, 2025

I disagree with this. I don't see the motivation behind this.

@rzr
Copy link
Contributor Author

rzr commented Feb 20, 2025

The motivation applies specifically when producing opensource software (shared code will be rebuild in a different env)

Not about the code we build and deliver as binaries

ok I can explain more but let others read what I initially proposed.

@jrosenberger
Copy link

I also disagree with this. If someone is building code on a new compiler that's stricter, they can always turn the warnings off themselves. They should do this knowingly rather than have us quietly do it for everyone.

@rzr
Copy link
Contributor Author

rzr commented Feb 20, 2025

If someone is building code on a new compiler that's stricter, they can always turn the warnings off themselves.

So this mean encouraging them to patch the released code, I am not in favor of downstream patches if it can be avoided,.

BTW IMHO we are making some assumptions here:

  • User has time to figure it out how to disable it (and not give up on 1st try or rant about it)
  • And will not try to fix the warning themselves downstream (and potentially break things and then ask for support)
  • User will try to upstream a fix and maintainers are willing to integrate it for an upcoming release (that will satisfy user needs until the next break)

@jrosenberger
Copy link

There is already a statement in the preceding paragraph that says "This applies to builds that are part of "make test". It does not apply to build mechanisms passed through to other projects."

I think if CI builds etc all run with Werror but the released code doesn't by default, I think that's fine. A conscious official choice like this is better than turning it on and off in random commits.

@jerome-pouiller
Copy link

This applies to builds that are part of "make test". It does not apply to build mechanisms passed through to other projects.

I think the document does not explain the drawbacks of always enforcing -Werror. The sentence above make think that always enforcing -Werror is not mandatory but is a good thing to do.

I suggest:

CI, SQA, tests and developers should compile with `-Werror` and report failures as bugs.

However, it is very difficult to ensure a code will never cause any warning with any 
compiler. Especially if we consider we don't know what warning will be introduced in the 
future compilers. The flag `-Werror` must not be enforced for the final consumer of the code.

@rzr
Copy link
Contributor Author

rzr commented Feb 21, 2025

Thank you for your feedback, it is interesting to see that this change is controversial (what is the priority our process or our users or a tradeoff ? , less provocatively can we satisfy our SDK users AND our "out of SDK" users ?)

Let's clarify, First let's try to see if we manage to reach a consensus on the final goal when producing OSS:

User/Integrator should be able to rebuild the released code without tweaking it for an unsupported env.

It is highly probable that the component will work as good, but just trigger warnings which is useful for developers not integrator (as I said previously it is a different mindset)

Please vote:

  • 👍 It is a valuable goal, support the idea
  • 👎 It will cause more problems (please explain)
  • 👁️ no strong opinion yet (need more inputs)

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.

4 participants