Another common solution to this problem is to write an encapsulation layer on top of the functionality needed, which at least protects your code from wild changes when upgrading to new versions of supporting libraries.
As to open source project lifetime, it should be clear which projects are healthy and which are not. For example, a project that is part of the Apache or Eclipse foundations are probably healthy, whereas some random thing on sourceforge is probably not. Generally, you can avoid this problem altogether by avoiding projects that do not seem active.
For the negatives to copying code into your project:
I know you wanted to put license aside, but you cannot in reality. I am not a lawyer and you should consult with one for your project if there may be issues, but if you are developing a proprietary system it could become GPL'ed accidentally.
It makes your development environment more cluttered. You have to worry about making sure the copied-in code ompiles properly, is being compiled with the right version, and has the right build scripts. You also have all this extra code in your IDE that takes up space.
As you pointed out, it makes updating code very difficult.
If you have to file bugs with the Open Source project, it becomes more difficult to do.
If you're not careful, a junior developer who doesn't know any better could go into the code and start mucking around with it.
There's probably more reasons not to do it, but that's a few. Hope that helps.
发布评论
评论(1)
对于您问题的某些方面,这可能相关: http://en.wikipedia.org/ wiki/DLL_hell#Running_Conflicting_DLLs_Simultaneously。
此问题的另一个常见解决方案是在所需功能之上编写一个封装层,这至少可以保护您的代码在升级到新版本的支持库时免受剧烈更改。
至于开源项目的生命周期,应该清楚哪些项目是健康的,哪些是不健康的。例如,属于 Apache 或 Eclipse 基金会的项目可能是健康的,而 sourceforge 上的一些随机项目可能不是。一般来说,您可以通过避免看起来不活跃的项目来完全避免这个问题。
对于将代码复制到项目中的负面影响:
可能还有更多不这样做的理由,但这只是少数。希望有帮助。
For some aspects of your problem, this might be relevant: http://en.wikipedia.org/wiki/DLL_hell#Running_Conflicting_DLLs_Simultaneously.
Another common solution to this problem is to write an encapsulation layer on top of the functionality needed, which at least protects your code from wild changes when upgrading to new versions of supporting libraries.
As to open source project lifetime, it should be clear which projects are healthy and which are not. For example, a project that is part of the Apache or Eclipse foundations are probably healthy, whereas some random thing on sourceforge is probably not. Generally, you can avoid this problem altogether by avoiding projects that do not seem active.
For the negatives to copying code into your project:
There's probably more reasons not to do it, but that's a few. Hope that helps.