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

Various refactoring #562

Merged
merged 8 commits into from
Nov 3, 2024
Merged

Various refactoring #562

merged 8 commits into from
Nov 3, 2024

Conversation

RhoSigma-QB64
Copy link
Member

This PR removes the unstable state from the HTTP support. The other big part is refactoring several parts to benefit from the shortly added auto-includes. It also adds a pre-compiler flag indicating the $DEBUG state, this closes #29 .

It's recommended to review commit by commit, the commit notes give more informations.

- refactor $LET variable handling for easier addition of new presets and exposing internal values to the currently compiling program
- exposed DEPENDENCY_SOCKETS for conditional compiling of net helper functions in auto-include afterlastline.bm
- added DEBUG_IS_ACTIVE variable indicating program is compiling with $DEBUG features, closes #29
- no longer requires HTTP support to be enabled by $UNSTABLE:HTTP flag, instead libcurl is always pulled together with DEPENDENCY_SOCKETS
- adapted helper function WhatisMyIP$ to use libcurl features which are always available now
- deleted unneeded $UNSTABLE http tests and revoved the flag from the remaining http tests
- removes some unreliable commented code sections (updating)
- guess we won't ever go to reactivate and fix this anyway
- reworked to run through the new auto-include logic, rather than by faking a real $INCLUDE internally
- added error messages in case someone is trying to use both color sets in the same program
- for the rare case someone really needs both, the $COLOR:0 constants are also added to $COLOR:32, but "z" prefixed
- tests to prove the files are auto-included as expected
- testing the exposed $DEBUG state flag
- cleaning the dependency system
- final adjustments
- adapting all source files to use the new constants provided through auto-include beforefirstline.bi
- removed the old constants from global/constants.bi
- some formatting
- updating the bootstrap compiler to work under the new conditions
- this is ridiculous, just because line numbers have changed it fails
- somebody should rethink that test system
- meantime we more fixing the tests, than errors in the source they shall unveil
@RhoSigma-QB64 RhoSigma-QB64 removed this from the Stabilize HTTP support milestone Nov 3, 2024
'These are equal to $COLOR:0 constants, but prefixed with "z" (for zero)
'to avoid conflicts with same named constants in the block above.

CONST zBlack~%% = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's safe to add more of these since they lack the underscore :-/

@RhoSigma-QB64 RhoSigma-QB64 merged commit b46420d into main Nov 3, 2024
4 checks passed
@RhoSigma-QB64 RhoSigma-QB64 deleted the various-refactoring branch November 3, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
const-issues enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Need a preprocessor identifier when $DEBUG is used
2 participants