Question

I have two versions of a framework both stored under a "thirdparty" directory in my depot. One is in beta which I'm evaluating, and the other is stable. When I first made my workspace, I had it set up to use the stable one, but now I'd like to switch it to use the beta one for testing. I've got a few questions:

  1. Let's say the frameworks are named Framework-2.0-beta and Framework-1.0-stable. Ideally I'd like them to just simply map to a "framework" directory on my local machine, so that I don't have to change all my include paths and such in my project files. Then, in theory, if I wanted to swap back and forth between frameworks, I'd just simply change which one from the depot I'm pulling and then do an update again. How do I do this? I tried at first just mapping them like I mentioned above, but I seem to be getting some errors using this method.

  2. Is this the best way to go about something like this? Like, am I supposed to instead just use a unique workspace for use with one version of the framework vs. another?

Thanks for your help.

Was it helpful?

Solution

The most straight forward way with just perforce means is to put both versions framework the framework to perforce and map one of them in the clientview of your project. For example submit the frameworks to places like this: //thirdparty/framework-2.0-beta/... //thirdparty/framework-1.0-stable/...

In your projects clientview you map one of the two to a fixed target path, e.g.: //thirdparty/framework-2.0-beta/... //yourclient/framework/...

So far so good. But in larger environments (with several people developing the same project) you will definitely run into problems with that approach because:

  • the compile/test/performance results of your workspace are not necessarily the same of other people working on the same project (depending on the clientview)

  • having several modules (thirdparty or not) and handling them in this way will be hard to manage and lead to problems with crossdependencies (e.g. module a version 2 will require module b version > 3, but that doesn't work with certain other modules, etc.)

There are tools to solve these dependency issues. Look for Apache Ivy or Maven.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top