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

iox-#2209 Refactor ssize_t to iox_ssize_t for Windows compatibility #2342

Merged

Conversation

khromenokroman
Copy link
Contributor

@khromenokroman khromenokroman commented Aug 29, 2024

This change updates the ssize_t type to iox_ssize_t in Windows-specific files to resolve a compatibility issue. It ensures consistent type usage and includes the necessary headers for type definitions.

Notes for Reviewer

Pre-Review Checklist for the PR Author

  1. Code follows the coding style of CONTRIBUTING.md
  2. Tests follow the best practice for testing
  3. Changelog updated in the unreleased section including API breaking changes
  4. Branch follows the naming format (iox-123-this-is-a-branch)
  5. Commits messages are according to this guideline
  6. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  7. Relevant issues are linked
  8. Add sensible notes for the reviewer
  9. All checks have passed (except task-list-completed)
  10. Assign PR to reviewer

Checklist for the PR Reviewer

  • Consider a second reviewer for complex new features or larger refactorings
  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files from iceoryx_hoofs have been added to ./clang-tidy-diff-scans.txt
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

@elBoberido I don't have windows to check the build :(

Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

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

Can you please add this to the end of the bugfix section of iceoryx-unreleased.md

ssize_t: redefinition; different basic types [#2209](https://github.com/eclipse-iceoryx/iceoryx/issues/2209)

It also seems that you need to run clang-format on the changed files.

Btw, the git hooks would take care of this. Have a look at tools/git-hooks/Readme.md

@khromenokroman
Copy link
Contributor Author

Can you please add this to the end of the bugfix section of iceoryx-unreleased.md

ssize_t: redefinition; different basic types [#2209](https://github.com/eclipse-iceoryx/iceoryx/issues/2209)

@elBoberido fixed

@khromenokroman
Copy link
Contributor Author

It also seems that you need to run clang-format on the changed files.

@elBoberido fixed

elBoberido
elBoberido previously approved these changes Aug 30, 2024
Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

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

Can you also please squash your commits?

.github/workflows/build-test.yml Outdated Show resolved Hide resolved
iceoryx_platform/win/include/iceoryx_platform/mqueue.hpp Outdated Show resolved Hide resolved
iceoryx_platform/win/include/iceoryx_platform/mqueue.hpp Outdated Show resolved Hide resolved
iceoryx_platform/win/source/unistd.cpp Outdated Show resolved Hide resolved
@khromenokroman
Copy link
Contributor Author

khromenokroman commented Aug 30, 2024

@elBoberido done :)
https://github.com/khromenokroman/iceoryx/actions/runs/10632957667

@khromenokroman
Copy link
Contributor Author

Can you also please squash your commits?

@elBoberido done

@khromenokroman
Copy link
Contributor Author


With the latest changes this should also be fixed.

@elBoberido if you return it then it doesn't work on msvc

@elBoberido
Copy link
Member


With the latest changes this should also be fixed.

@elBoberido if you return it then it doesn't work on msvc

I just tried it locally with msvc and also mingw and it worked. I think it was just an intermediate problem. Can you revert that change to see if the CI has an other opinion :)

@khromenokroman
Copy link
Contributor Author

I just tried it locally with msvc and also mingw and it worked. I think it was just an intermediate problem. Can you revert that change to see if the CI has an other opinion :)

@elBoberido canceled the changes

@khromenokroman
Copy link
Contributor Author

khromenokroman commented Aug 30, 2024


With the latest changes this should also be fixed.

@elBoberido if you return it then it doesn't work on msvc

I just tried it locally with msvc and also mingw and it worked. I think it was just an intermediate problem. Can you revert that change to see if the CI has an other opinion :)

@elBoberido Error in Build & Test / build-test-windows-msvc

D:\a\iceoryx\iceoryx\iceoryx_platform\win\include\iceoryx_platform\mqueue.hpp(55,8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\a\iceoryx\iceoryx\build\hoofs\iceoryx_hoofs.vcxproj]

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.22%. Comparing base (1549c96) to head (14d6e9b).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2342      +/-   ##
==========================================
- Coverage   78.23%   78.22%   -0.01%     
==========================================
  Files         433      433              
  Lines       16033    16033              
  Branches     2299     2299              
==========================================
- Hits        12543    12542       -1     
  Misses       2647     2647              
- Partials      843      844       +1     
Flag Coverage Δ
unittests 78.05% <ø> (-0.01%) ⬇️
unittests_timing 15.06% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

@elBoberido
Copy link
Member


With the latest changes this should also be fixed.

@elBoberido if you return it then it doesn't work on msvc

I just tried it locally with msvc and also mingw and it worked. I think it was just an intermediate problem. Can you revert that change to see if the CI has an other opinion :)

@elBoberido Error in Build & Test / build-test-windows-msvc

D:\a\iceoryx\iceoryx\iceoryx_platform\win\include\iceoryx_platform\mqueue.hpp(55,8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\a\iceoryx\iceoryx\build\hoofs\iceoryx_hoofs.vcxproj]

Oh, sorry. I was not precise enough. With revert the changes I actually meant to replace mqd_t with iox_ssize_t. Can you please do that for the two functions. With the current code it would be to replace ssize_t with iox_ssize_t.

Can you then also please squash the last three commits.

@khromenokroman khromenokroman force-pushed the iox-#2209-replace-type branch 3 times, most recently from 8b05151 to 14d6e9b Compare August 30, 2024 20:59
@khromenokroman
Copy link
Contributor Author

Oh, sorry. I was not precise enough. With revert the changes I actually meant to replace mqd_t with iox_ssize_t. Can you please do that for the two functions. With the current code it would be to replace ssize_t with iox_ssize_t.

@elBoberido fixed

@khromenokroman
Copy link
Contributor Author

Can you then also please squash the last three commits.

@elBoberido done

@elBoberido elBoberido merged commit 9f7a966 into eclipse-iceoryx:main Aug 31, 2024
26 checks passed
@elBoberido
Copy link
Member

Thanks :)

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.

ssize_t: redefinition; different basic types
2 participants