iceoryx icon indicating copy to clipboard operation
iceoryx copied to clipboard

Replace 'iox::string' with semantically appropriate types like `FilePath`

Open elBoberido opened this issue 2 years ago • 3 comments

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 https://github.com/eclipse-iceoryx/iceoryx/pull/2016#discussion_r1315024006

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 avatar Sep 04 '23 19:09 elBoberido

@elfenpiff FYI

elBoberido avatar Sep 04 '23 19:09 elBoberido

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.

varuntumbe avatar Sep 05 '23 12:09 varuntumbe

@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.

elBoberido avatar Sep 05 '23 14:09 elBoberido