-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix: removed duplicate file #920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have compared the two EnumFlags.hpp. There are a few small differences. But they are so small that it is okay.
The bazel build fails because EnumFlags.hpp is missing. So you should change the bazel stuff, too. |
a3dc05e
to
0380be0
Compare
I'm not sure how bazel works, it doesn't seem to like having relative paths added.
|
@james-ctc we can probably help fix bazel but removing it to "fix" cannot a serious idea |
modules/EvseManager/CMakeLists.txt
Outdated
@@ -21,6 +21,10 @@ target_sources(${MODULE_NAME} | |||
PersistentStore.cpp | |||
) | |||
|
|||
target_include_directories(${MODULE_NAME} PRIVATE | |||
../../lib/staging/util |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we just link against the lib/stating/util?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we just link against the lib/stating/util?
because there are no object files to link against. EnumFlags.hpp is a header file only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we already consider to create a library target for the lib/staging/util
stuff (maybe that's what @dorezyuk means)? The library target could be named something like everest::staging::util
. Code like here would consume it then via target_link_libraries(${MODULE_NAME} PRIVATE everest::staging::util)
.
This works also for header-only libraries.
Furthermore we would decouple the information from where the library is located from the consuming code.
@james-ctc: if you need help with this (cmake related), I could help here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a-w50 thank you for the useful information. I've not heard the term header-only library. I'm still relatively new to cmake (used make for 30+ years) so your help is much appreciated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add a commit here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@james-ctc I added a commit as a draft on how to include additional libraries (in this case everest::staging::util
) including the test via cmake.
It is working now, but I'm not really happy with the namespacing/naming so far. The namespace is quite long. Maybe we can reduce this a bit by using ev
instead of everest
and staging
could become draft
. And once it becomes stable it might go to ev::std::util
or something similar. Accordingly the include directory structure would need to be adopted.
For now the commit could be taken as is, but soon we should come up with some naming conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for your help.
please feel free to add a fix - I don't know bazel at all. |
8996aea
to
bd57237
Compare
@@ -7,7 +7,7 @@ | |||
#include <atomic> | |||
#include <type_traits> | |||
|
|||
namespace util { | |||
namespace everest::staging::util { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how you structure it but I would find the include path everest/staging/util
more logical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, for now this would be more consistent. I'll change that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dorezyuk I removed the one line from the EvseManager/bazel file, as this should not be needed there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the build works but where do we include it then?
Signed-off-by: James Chapman <[email protected]>
Signed-off-by: James Chapman <[email protected]>
Signed-off-by: aw <[email protected]>
Signed-off-by: aw <[email protected]>
Signed-off-by: aw <[email protected]>
Signed-off-by: Dima Dorezyuk <[email protected]>
Signed-off-by: aw <[email protected]>
Signed-off-by: James Chapman <[email protected]>
4808f0b
to
6a1070b
Compare
Describe your changes
EnumFlags.hpp was in two places. Removed duplicate file
Issue ticket number and link
Checklist before requesting a review