Comments (9)
PcapPlusPlus is often used by inexperienced developers and one of the things I always cared about is making it as easy to use as possible. I'm a strong believer in ease of use because that's what I expect when getting into a new library or project.
So even if it makes our lives (maintainers) a bit harder, it's worth the ease of use for the library's users.
If I didn't care about that I'd make it a submodule in the first place, that's the option that makes the most sense from a library maintainer point-of-view.
from pcapplusplus.
@seladb sure, revised the issue content.
from pcapplusplus.
@tigercosmos I don't think we should use git submodule. Unfortunately submodules are not very convenient because the user needs to remember to fetch them (a simple git clone
won't fetch them by default).
I think we can keep what we do now, just sync the git commit against our fork instead of the upstream repo
from pcapplusplus.
@seladb I think we can just write in the document to use git clone --recurse-submodules
?
I think we can keep what we do now, just sync the git commit against our fork instead of the upstream repo
Do you mean to copy the code from the forked repo? I think it doesn't make the maintaining sync issue easier.
from pcapplusplus.
@seladb I think we can just write in the document to use
git clone --recurse-submodules
?I think we can keep what we do now, just sync the git commit against our fork instead of the upstream repo
Do you mean to copy the code from the forked repo? I think it doesn't make the maintaining sync issue easier.
yes... that's the reason I copied the code in the first place. Enforcing doing git clone --recurse-submodules
is pretty annoying. Please notice we do that for all 3rd party libs. Since it's a forked repo that we don't change a lot, it shouldn't be very hard to maintain our copied code the same as the fork...
from pcapplusplus.
I disagree with duplicating the code. If we opt to increment the version in the forked repository, it would result in copying all the code into PCPP. This approach seems inefficient. Instead, why not simply increment the commit in the git submodule?
Kindly permit me to invite @clementperon and @egecetin to share their opinions on this matter as well.
from pcapplusplus.
To be honest submodule is not a problem for experienced developers they can easily figure out when they even configuring project with CMake and get path does not exist or similar error. But for most inexperienced people it is quite hard to figure out they missed the submodule init (Why does the git clone default do not fetch submodules, they are part of code, so I think also which is a bit annoying). If the concern is only troubles caused by missing the submodule initialization maybe we can add a warning line to CMake to remind people to call git submodule update --init --recursive
(since they already cloned this command is better) if the path/file does not exist?
And a side note, source code zip downloads from GitHub also do not contain submodules
from pcapplusplus.
@seladb how about this way, we don't copy the forked code into PCPP nor use the git submodule.
When the user runs cmake
for the first time in PCPP, cmake will fetch and get the code of LightPcapNg from the forked repo.
For example:
include(ExternalProject)
# Define the external project
ExternalProject_Add(
MyProjectExternal # Arbitrary name for the project
PREFIX ${CMAKE_BINARY_DIR}/MyProject # Directory where the project will be downloaded and built
GIT_REPOSITORY https://github.com/username/repo.git # URL of the Git repository
GIT_TAG master # Branch, tag, or commit hash to checkout
UPDATE_DISCONNECTED 1 # Don't update the project during the build
# You can also specify other options such as CONFIGURE_COMMAND, BUILD_COMMAND, INSTALL_COMMAND, etc.
)
# Add dependencies of your main project to the external project
add_dependencies(MyMainProject MyProjectExternal)
from pcapplusplus.
ExternalProject_Add
Hmm I'm open to this idea! Can you please create a POC of this to see how it works?
from pcapplusplus.
Related Issues (20)
- Pcapng Parsing failure/confusion if unknown interface ID HOT 12
- Error when reading a packet HOT 1
- Why is std::byte not used? HOT 2
- Jumbo Frames in DPDK devices HOT 7
- Power of 2 restriction for number of queues in DpdkDevice HOT 3
- Fix building warning due to LightPcapNg HOT 10
- Error linking pcapplusplus using vcpkg and CMake. HOT 2
- improve macOS get default gateway IP HOT 13
- PcapPlusPlus Configuration Error in CMake with vcpkg HOT 8
- PcapLiveDevice socket is not close HOT 2
- Problem with TcpReassembly and chunked transfer encoding HOT 6
- SNI Extension with zero length HOT 2
- Find alternative package for netifaces HOT 1
- Transfer this repository into PcapPlusPlus GitHub organization HOT 15
- warning C4193 HOT 4
- warning C4133 HOT 1
- warning C4129 HOT 1
- -DBUILD_SHARED_LIBS=ON cannot work in Windows HOT 12
- Address all MSVC compilation warnings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcapplusplus.