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

Replace 'iox::string' with semantically appropriate types like FilePath #2018

Open
4 tasks
elBoberido opened this issue Sep 4, 2023 · 3 comments
Open
4 tasks
Assignees
Labels
enhancement New feature good first issue Good for newcomers technical debt unclean code and design flaws

Comments

@elBoberido
Copy link
Member

elBoberido commented Sep 4, 2023

Brief feature description

In many places an iox::string is used instead of a semantically more appropriate type like FilePath. In order to prevent superfluous checks and easy to make mistakes the semantically appropriate type shall be used.

See also #2016 (comment)

Detailed information

Tasks

  • Check the usage of iox::string in the API
  • Replace iox::string with FileName, UserName, GroupName, FilePath and Path
  • Use FileName for RuntineName_t, which is an iox::string alias
  • Use FileName for detail::PosixSharedMemory::Name_t, which is an iox::string alias
@elBoberido elBoberido added enhancement New feature good first issue Good for newcomers technical debt unclean code and design flaws labels Sep 4, 2023
@elBoberido
Copy link
Member Author

@elfenpiff FYI

@varuntumbe
Copy link

Hi @elBoberido ,

I would like to take this issue if it's okay. I am currently reading about the project and it's architecture so it might take a few days. Also I will ask the questions here if it's okay.

Thanks.

@elBoberido
Copy link
Member Author

@varuntumbe sure, go ahead :)

A good starting point are MessageQueue, NamedPipe and UnixDomainSocket. I would suggest to start with UnixDomainSocketBuilderNoPathPrefix to get an idea of our PR workflow. There is a formalism to follow due to this project being used in safety critical environments which requires traceability of the source code.

UnixDomainSocketBuilder, NamedPipeBuilder and UnixDomainSocketBuilder need to be changed all at once since they are used for the IpcChannel. This might require some deeper understanding.

You can of course also look for other places where currently a iox::string is used and a semantic string might make more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature good first issue Good for newcomers technical debt unclean code and design flaws
Projects
None yet
Development

No branches or pull requests

2 participants