Skip to content

Developer Expierence Improvements and Infrastructure Modernization#680

Draft
k5602 wants to merge 9 commits intometacall:developfrom
k5602:dx
Draft

Developer Expierence Improvements and Infrastructure Modernization#680
k5602 wants to merge 9 commits intometacall:developfrom
k5602:dx

Conversation

@k5602
Copy link
Copy Markdown
Contributor

@k5602 k5602 commented Mar 12, 2026

drafted and will be updated once it's over,tested and approved.

Pull clang-format image at CMake configure time
to avoid long first-run pulls when invoking the
clang-format build target.
@k5602 k5602 marked this pull request as draft March 12, 2026 06:41
@k5602 k5602 changed the title Developer Expierence Improvements Developer Expierence Improvements and Infrastructure Modernization Mar 12, 2026
k5602 added 5 commits March 12, 2026 08:50
Standardize repository to LF line endings to avoid
CRLF-related diffs and tooling inconsistencies.
Files changed: .editorconfig, .clang-format
Fix several CMake flag issues and typos
Correct the stack protector check to use the C
variable so -fstack-protector is detected for C
builds. Fix CRT macro typos (_CTR -> _CRT) in C and
C++ warning settings. _FORTIFY_SOURCE is appended
only to Release and RelWithDebInfo flag sets to
avoid forcing -O3. Use message(STATUS) for unknown
compiler cases
Map macOS to the unix hooks directory and set the
project's local core.hooksPath via git config
# SpacesInSquareBrackets: false
TabWidth: 4
UseCRLF: true
UseCRLF: false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is wrong, use crlf

[*]
charset = utf-8
end_of_line = crlf
end_of_line = lf
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is wrong too, use crlf it's cross-platform

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I appreciate the guidance, but after searching after last talk and the problem i went through from the wrong .editorconfig i was through +5000 & -3000 problem when i pulled it, so i want to state that LF is actually the cross-platform standard. CRLF is Windows-specific only. Using LF with Git's core.autocrlf setting ensures that developers on Windows, Mac, and Linux etc all work with consistent line endings, and lf gives the best of both worlds and it's the standard the works everywhere.

k5602 added 3 commits March 12, 2026 18:17
Add installation logic for clang-format 12 to the
Windows and POSIX environment setup scripts.

Windows: download standalone clang-format 12
executable to dependencies and expose both
clang-format.exe and clang-format-12.exe. If the
download fails but Docker is present, install a
wrapper that proxies through a pinned Docker image.

POSIX: try distro-specific native installs (apt,
apk, dnf/yum, zypper, brew). If native install
is unavailable or the version mismatches, create a
Docker-based wrapper at /usr/local/bin using the
same pinned image. Provide an unversioned alias
only when no system clang-format exists.

Ensure cmake/FindClangFormat and git hooks can
find a callable, versioned clang-format during
build and formatting steps.
Emit a CMake WARNING when a sanitizer option is
enabled but the build type will not activate it.
Checks OPTION_BUILD_THREAD_SANITIZER,
OPTION_BUILD_MEMORY_SANITIZER and
OPTION_BUILD_ADDRESS_SANITIZER are warned
unless CMAKE_BUILD_TYPE is Debug or
RelWithDebInfo. This prevents silent no-ops
that waste debugging time (as occurred in
node_ci). Suggest reconfiguring with
-DCMAKE_BUILD_TYPE=Debug to enable sanitizers.

Also fix spacing in tools/metacall-build.sh
so the BUILD_BENCHMARKS condition parses
correctly
Find clang-format 12 on host and fall back to a
Docker wrapper when not available
Add common install paths for Linux/macOS/Windows
Validate major version and generate shell/cmd
wrappers in the build directory
Update pre-commit hook to prefer clang-format-12
and use Docker image
ghcr.io/jidicula/clang-format:12
when native binary is missing; pull image early
to avoid stalls
Restrict formatting to source/* C/C++ files and
improve messages and interactive UI
Ensure consistent formatting version across CI
and contributors
@k5602 k5602 marked this pull request as ready for review March 15, 2026 20:00
@viferga
Copy link
Copy Markdown
Member

viferga commented Mar 21, 2026

This PR is too big, I'm going to put it as draft and we can PR small parts of it incrementally.

@viferga viferga marked this pull request as draft March 21, 2026 01:23
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.

2 participants