No /commands shouldn’t be there in the 2.x versions.
Can you rerun the console with –debug, attach a debugger and give me the stack trace? There’s something strange going on there
So this is a 1.0 OpenWrap command export builder trying to load up something from OpenWrap 2.0, which means the OpenWrap.dll 2.0 is being loaded even though you have 1.0 in your project, hence the problem.
When you run with –debug, the shell tells you the location of the preloaded packages, I’d need that too.
As for updating your project, if all else fails, you can do o update-wrap openwrap –project –usesystem which will force the openwrap 2.0 dlls being loaded (provided they are installed in your system repository)
Hmm, this is all very very strange, there’s no trace of a 2.0 openwrap dll being loaded, god knows where it comes from.
Can you run the fusion log viewer to see where the 2.0 dll gets loaded from when you run the command?
Seb
I’ve just uploaded a new version of the shell (2.0.0.10), can you try to update and see if it helps?
Sorry, http://openwrap.org/o.exe
Ok just building a VM to check 1.0 compat, as there seems to be something quite wrong in all this. I’ll come back to you in a few minutes
Ok I have a repro, working on it
Mmmmmk, so there’s a bug in 1.0.0 that makes the 1.0 code load the 2.0 code because it doesn’t select the correct packages. Argh.
I’m gonna release a 1.0.1 package that’ll fix that and another issue in the 1.0 branch, that does mean you need to update to 1.0.1 before you update to 2.0 or everything will break.
Compat is hard work :)
So I thought I’d give some details about the investigation I did on that problem, as it has a couple of implications.
The reason everything goes tits up is rather simple. The preloader component in OpenWrap preloads any dependencies that OpenWrap needs to be able to start doing things with packages. That’s mostly SharpZipLib, mono.cecil and OpenFileSystem, and currently the preloader doesn’t really respect version ranges and takes whatever latest version it can find to preload.
Note that the preloader is used all over the place, it’s a shared component between the shell, the VS COM add-in, the MSBuild task and the now mostly defunct UI shell.
There’s a first problem there that’s been ongoing, which is that if, say, mono.cecil gets updated to an incompatible version, be it that the descriptor mentions it or not, we’ll happily attempt loading whatever latest is installed in the same repository as where openwrap is. That problem will be fixed at some point in the future, but not now (https://github.com/openrasta/openwrap-bootstrap/issues/15 ).
Once those assemblies are all pre-loaded, OpenWrap hooks up to the assembly resolver to give its choice as to what assemblies will be dynamically loaded. This is where it gets hairy.
As part of that process, OpenWrap now uses the full resolving algorithm to match what packages are compatible with the current project’s descriptor. In the case here, the project you had was declaring “any version of OpenWrap”, which meant once you’ve installed 2.0 in the system repository that 2.0 was compatible and as such got loaded (even though 1.0 was already loaded). To simplify, both get loaded, 1.0 in the LoadFrom context, 2.0 in the Load context, making 1.0 unable to load 2.0.
As you can see from https://github.com/openrasta/openwrap/issues/130 the problem is not new, and part of the 2.0 codebase was to prepare being able to execute commands in an isolated space if they come from a different repository than the currently running OpenWrap. As 1.0 cannot execute commands targeting 2.0 we’re all good from a versioning compat problem, and this will be sorted shortly.
I started writing a long explanation but the details are of little interest to anyone but me. Here’s a summary of the situation when you run a command from a project that has OpenWrap:
Project OpenWrap version | System OpenWrap version | Command source | Result |
1.0 | 1.0 | Project | OK |
1.0 | 1.0 | System | OK |
1.0 | 2.0 | Project | Fail |
1.0 | 2.0 | System | Fail |
2.0 | 1.0 | Project | OK |
2.0 | 1.0 | System | ? |
There’s a whole other problem due to the versioning unification done in the system repository globally which is another issue altogether, and also has a bug entry I just added (https://github.com/openrasta/openwrap/issues/241) which would enable each package being added to have its own set of dependent pacakges, as if each was an independent project.
Once all this is resolved, which will definitely be a 2.0 thing, we need to decide what command gets run, but I’ll do a separate email.
In the meantime, I’ve published the 1.0.1 OpenWrap package. You should update your project / system to 1.0.1 first before attempting to install 2.0, for which I’ve also pushed an extra package (on the beta site).
Let me know how you get on tomorrow.
Seb
Nah the shell is independent and works across all versions :)
Do remember that 1.0 didn’t check for the existence of a .wrap file before reading the directory in /wraps/_cache, so if you remove 2.0 you *need* to remove the folders in /_cache, both in the system and the project repository.
From: openwra...@googlegroups.com [mailto:openwra...@googlegroups.com] On Behalf Of Paul Cowan
Sent: 14 September 2011 05:59
To: openwra...@googlegroups.com
Subject: Re: [openwrap-devl] Openwrap could not be started
Thanks for the explanation.
So in order to update to 1.0.1, I need to do the following:
1. cd into my openwrap git repo
2. git fetch
3. git checkout 1.0.1
4. o build-wrap
5. o update-wrap openwrap -sys
6. cd into my project directory
7. o update-wrap openwap -project -usesystem
Now the StackOverflowException that’s an issue. Can you update to http://github.com/OpenWrap/openwrap.github.com/raw/master/o.exe and see if that happens again?
Removing stuff in _cache should never ever cause any issues, as it’s all uncompressed before any loading gets attempted.
I’ve built 1.0.1 with the 2.0.0.8 shell so if there’s another issue, can you make sure it isn’t because of one of those reasons: any 2.0 wrap files left in the system repository, either /wraps or /wraps/_cache, your project descriptor doesn’t specify an =1.0 in the descriptor for the openwrap dependency, or the 1.0.1 branch is actually committed with the 1.0.1 openwrap package?
Well that one is much better. That means you’ve left VS or other tools opened and they kept a lock on your file, preventing openwrap from moving stuff around.
Yes, master is 2.0.
If you’re within a 2.0 enabled project you can build from another location, o build-wrap –from c:\src\openwrap –quiet –incremental; o update-wrap openwrap –proj
The –incremental prevents a clean from being called on the build so it makes the build much quicker, -quiet removes the output, which makes the build substantially quicker.
From: openwra...@googlegroups.com [mailto:openwra...@googlegroups.com] On Behalf Of Paul Cowan
Sent: 15 September 2011 14:17
To: openwra...@googlegroups.com
Subject: Re: [openwrap-devl] Openwrap could not be started
Hi,
So I have updated OW to 1.0.1 now and commands like o list-wrap work.
Can I just check my next steps before executing them:
1. cd into the openwrap git repo.
2. git checkout master
3. o build-wrap
4. o update-wrap openwrap -sys
5. cd into project directory
6. o update-wrap openwrap -project -usesystem