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

Upgrade to ubuntu-24.04 #181

Merged
merged 1 commit into from
Aug 25, 2024
Merged

Upgrade to ubuntu-24.04 #181

merged 1 commit into from
Aug 25, 2024

Conversation

Damien-Chen
Copy link
Contributor

Upgrade to ubuntu-24.04 and corresponding version of clang-format in Github Workflow.

@jserv
Copy link
Contributor

jserv commented Aug 24, 2024

At present, CONTRIBUTING.md suggests clang-format version 12, and we have to validate the compatibility of clang-format versions between 14 and 16.

@Damien-Chen
Copy link
Contributor Author

Damien-Chen commented Aug 24, 2024

It means that running same code on local ubuntu-24.04 machine with clang-format-16 and compare if it is same as in clang-format-12 ? As there is a note in CONTRIBUTING.md :
Software requirement: clang-format version 12 or later.

@jserv
Copy link
Contributor

jserv commented Aug 24, 2024

It means that running same code on local ubuntu-24.04 machine with clang-format-16 and compare if it is same as in clang-format-12 ?

You should run various versions of clang-format on the existing codebase shipped in this repository to figure out the potential incompatibility. Once we confirm the compatibility, we can move forward.

@Damien-Chen
Copy link
Contributor Author

damien@DESKTOP-OVK618D:~/lab0-c$ find . \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) | xargs clang-format-14 -i
damien@DESKTOP-OVK618D:~/lab0-c$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   dudect/fixture.c

no changes added to commit (use "git add" and/or "git commit -a")
damien@DESKTOP-OVK618D:~/lab0-c$ git add .
damien@DESKTOP-OVK618D:~/lab0-c$ git commit -m "Format with clang-format-14"
[master 4656977] Format with clang-format-14
 1 file changed, 5 insertions(+), 2 deletions(-)
damien@DESKTOP-OVK618D:~/lab0-c$ find . \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) | xargs clang-format-16 -i
damien@DESKTOP-OVK618D:~/lab0-c$ git diff

I test two method, and the test code base is clean(forked from repo and nothing is modified)

The first result is showed as the above log. I use two version of clang-format to format all code, and use Git to check difference, the result show nothing.

The second is I use 'clang-format-14' to format my code, and push it to my owk fork branch(run clang-format-16 coding sytle test). Thes result is pass.

@jserv jserv merged commit ce03811 into sysprog21:master Aug 25, 2024
1 of 2 checks passed
@jserv
Copy link
Contributor

jserv commented Aug 25, 2024

Thank @Damien-Chen for contributing. You should improve the git commit messages.

@Damien-Chen Damien-Chen deleted the patch-1 branch August 25, 2024 16:46
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