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

[Code Cleanup] Cleaned up some header files and move a bit of debugging logic to cmake #7677

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

Conversation

Rossmaxx
Copy link
Contributor

@Rossmaxx Rossmaxx commented Feb 2, 2025

  • Renamed the lmms_basics.h to LmmsTypes.h and scoped it down for that purpose.
  • Shifted the LMMS_STRINGIFY macro to it's own header.
  • Removed the debug.h header file and use cmake handle the macro logic.
  • Remove some unused headers
  • Move constants used by the spectrum analyser to it's own header.

@Rossmaxx

This comment was marked as outdated.

@Rossmaxx Rossmaxx changed the title Cleanup lmms_basics.h and simplify the LMMS_STRINGIFY macro to be used at call sites. Rename lmms_basics.h and scope it down to type declaration Feb 14, 2025
@Rossmaxx
Copy link
Contributor Author

Do note that the diff itself is small. Most of the thing is due to the file rename in the #include statement

@Rossmaxx Rossmaxx marked this pull request as ready for review February 14, 2025 15:32
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Feb 14, 2025

Now i should hunt down any unused includes over here, but I don't really have the insanity to do that manually.

Edit: using iwyu, I could somewhat automate this process.

@Rossmaxx
Copy link
Contributor Author

I'll fix the declaration later.

@Rossmaxx
Copy link
Contributor Author

Seems like I got myself into a rabbit hole with this refactoring

@Rossmaxx Rossmaxx changed the title Rename lmms_basics.h and scope it down to type declaration [Code Cleanup] Cleaned up some header files and move a bit of debugging logic to cmake Feb 22, 2025
@Rossmaxx
Copy link
Contributor Author

I'm done now.

@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 1, 2025

ahh crap, i messed up a rebase

@Rossmaxx Rossmaxx marked this pull request as draft March 1, 2025 07:10
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 1, 2025

I'll fix stuff later

@Rossmaxx Rossmaxx force-pushed the clean-lmms-basics branch from a339a32 to 3fb24f2 Compare March 3, 2025 14:49
@Rossmaxx

This comment was marked as outdated.

@Rossmaxx Rossmaxx force-pushed the clean-lmms-basics branch from 72fd59d to 8cf8b36 Compare March 3, 2025 15:23
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 3, 2025

I'll undraft the PR once I manage to fix the history. The work is done for now.

@tresf
Copy link
Member

tresf commented Mar 3, 2025

@tresf any idea on fixing this?

When I get into a pickle like this, I take the lazy route and PR against a test branch that's even with master, squash everything down, force that commit back. For this reason, I'm probably not a good person to ask. Last time my efforts were scrutinized #7726. Perhaps someone with more experience in this area can help.

@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 3, 2025

I found a way to fix it. I'll reorder commits using an interactive rebase. But it is a bit effort consuming tho.

@Rossmaxx Rossmaxx force-pushed the clean-lmms-basics branch from 303612f to 756c90e Compare March 3, 2025 16:33
Rossmaxx added 27 commits March 3, 2025 22:34
nvm, release is better

This is redundant as cmake already handles this logic

added the correct behaviour for NDEBUG flag

order change
include the cstdint header which should be it
fix build
@Rossmaxx Rossmaxx force-pushed the clean-lmms-basics branch from 9880fd6 to b7eb195 Compare March 3, 2025 17:04
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 3, 2025

Eureka, I managed to fix everything. GPT o1 really came in clutch here.

@Rossmaxx Rossmaxx marked this pull request as ready for review March 3, 2025 17:06
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.

5 participants