Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
todo: use same CFLAGS for all demos (general pass for each ./demo/*/Makefile)
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
We have some differences in how each demo is being build. This creates few problems mentioned below. I want to make a pass on all of them and make all compilation flags consistent. Here are the changes that I'm considering:
1. Ensure optimizations are disabled with `-O0`. Currently, few demos use `-O2` and waste our CI time. (reference: https://github.com/Immediate-Mode-UI/Nuklear/pull/894#issuecomment-3880979941 )
1. Ensure that debug symbols are enabled with `-g`. This will allow for better debugging without affecting compilation times as much. (I'm still not entirely sure, if it's worth it, but I think it is, GCC enables this by default anyway)
1. Ensure the same C standard with `-std=c99` (?) I think some people may disagree so I will quickly explain: Nuklear itself is C89 but the demos are not. Most of the demos already need C99 in some form or another, and even if you aren't getting any pedantic warnings with your setup, you will get them after using `#define INCLUDE_ALL`. We can keep the backend headers C89 compliant, but we should compile the demos with C99. This was allowed many years ago with https://github.com/Immediate-Mode-UI/Nuklear/commit/177f391347bf1c13dd3b3297e39ea16fa0041b18 and if someone disagree, then we should consider rewriting the demos with C89 in mind and reverting said rule, instead of lying about the support with `-std=c89`. Right now, people are wasting their time for submitting "_warning fixes_" that someone is about to reintroduce anyway. **(EDIT: after grepping the demos, it seems like most are using `-std=c89` so maybe my take wasn't so accurate after all, I still think we should talk about it though)**
1. Ensure we have the same warnings enabled with `-Wall -Wextra -pedantic`. Any ideas for other flags? We haven't tested with anything else, but maybe we should...
1. Add missing CIs as few demos do not have them (and this is must have when changing so much stuff)
1. I could also fix this one at the same time: https://github.com/Immediate-Mode-UI/Nuklear/issues/813
1. More... ?
Any thoughts?
cc @RobLoach @rswinkle
Contributor guide
Research direction
Compare the Makefiles under ./demo/*/Makefile and identify the existing compiler flags and CI coverage for each demo. Read the discussion and referenced issue #813 before deciding which changes are agreed upon. Done means the demos have an agreed, consistent build configuration and the affected CI jobs pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, ci-cd
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100