Skip to content

fix(rust) :: format the files cargo fmt could not see - #1378

Open
81reap wants to merge 2 commits into
sqlpage:mainfrom
81reap:sidequest/format
Open

fix(rust) :: format the files cargo fmt could not see#1378
81reap wants to merge 2 commits into
sqlpage:mainfrom
81reap:sidequest/format

Conversation

@81reap

@81reap 81reap commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • cargo fmt silently skipped all 38 files under sqlpage_functions/functions/.
  • Eleven of those files had drifted from the default style.

Description

Two commits in this PR.

  • 959f73ad
    • moves the module declarations out of the macro into plain mod items next to it. A function missing mod is a resolution error. An orphaned mod is a dead-code warning.
    • rust-analyzer can now resolve these modules too.
    • Adds a .git-blame-ignore-revs scaffold. We need to wait to merge into mainline to be able to pull the commit hash off mainline to ignore.
  • a732ccac runs cargo fmt --all. committed in a separate commit so that it can be added to .git-blame-ignore-revs.

Testing

n/a :: no behaviour changes

@81reap

81reap commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@lovasoa due to the .git-blame-ignore-revs, this PR should be merged as is. That way both commits independently show up at the tip of main. If you squash + merge then fix(functions) :: don't use macro to import and build SqlPageFunctionName will also be ignored

@81reap
81reap marked this pull request as ready for review August 13, 2026 06:03

@lovasoa lovasoa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

changing the formatting without changing the contributor and agent instructions or the ci does not really make sense to me

Comment thread .git-blame-ignore-revs
Comment on lines +1 to +4
# ignore commits from showing up on git diffs.

# === large formatting commits ===
# TODO :: add commit once merged into mainline No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we need this?

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.

yes, this is to ignore the formatting commit so that the blame correctly attributes the person who wrote it rather than the person who formatted it. if you don't care about that I can take it out

Comment on lines +12 to +49
mod basic_auth_password;
mod basic_auth_username;
mod client_ip;
mod configuration_directory;
mod cookie;
mod current_working_directory;
mod environment_variable;
mod exec;
mod fetch;
mod fetch_with_meta;
mod hash_password;
mod header;
mod headers;
mod hmac;
mod link;
mod oidc_logout_url;
mod path;
mod persist_uploaded_file;
mod protocol;
mod random_string;
mod read_file_as_data_url;
mod read_file_as_text;
mod regex_match;
mod request_body;
mod request_body_base64;
mod request_method;
mod run_sql;
mod send_mail;
mod set_variable;
mod uploaded_file_mime_type;
mod uploaded_file_name;
mod uploaded_file_path;
mod url_encode;
mod user_info;
mod user_info_token;
mod variables;
mod version;
mod web_root;

@lovasoa lovasoa Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

no, we need the macro to be able to keep the files in the functions folder and the actual functions in sync. this is documented, we can't change the behavior without changing the instructions

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