These are chat archives for Microsoft/CodeContracts

10th
Jul 2015
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 00:01
"C:\Users\seteplia\Documents\GitHub\CodeContracts\Microsoft.Research\ManagedCon
tract.Setup\buildMSI10.xml" (All target) (1) ->
"C:\Users\seteplia\Documents\GitHub\CodeContracts\CodeContracts.sln" (Clean;Reb
uild target) (2) ->
"C:\Users\seteplia\Documents\GitHub\CodeContracts\Microsoft.Research\Contracts\
MsCorlib\MsCorlib.Contracts10.csproj.metaproj" (Rebuild target) (41:3) ->
"C:\Users\seteplia\Documents\GitHub\CodeContracts\Microsoft.Research\Contracts\
MsCorlib\MsCorlib.Contracts10.csproj" (Rebuild target) (42:3) ->
(CreateMultiTargetContractReferenceAssembly target) ->
C:\Users\seteplia\Documents\GitHub\CodeContracts\Microsoft.Research\Contracts
\Multitarget.targets(490,5): error : Exception: Unknown custom metadata item ki
nd: 7 caught [C:\Users\seteplia\Documents\GitHub\CodeContracts\Microsoft.Resear
ch\Contracts\MsCorlib\MsCorlib.Contracts10.csproj]
Sam Harwell
@sharwell
Jul 10 2015 00:27
one sec
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 00:27
I'm installing VS2013 on that machine
Sam Harwell
@sharwell
Jul 10 2015 00:27
like I said, you don't need Visual Studio 2015 to build. Just .NET 4.6
You do need Code Contracts to build it, which means you can't build this project with 2015 until we create a release of this project that is compatible with 2015 (chicken and egg)
That's the error you were seeing above
Just install this on a machine with 2013 and you're good to go.
I'm headed out for a walk. I'll check back in about an hour.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 00:31
ok.
BTW, I can solve this chicken and egg problem, because I do have Code Contracts themselves for VS2015, I just can't build editor extensions:)
Sam Harwell
@sharwell
Jul 10 2015 00:33
it's still risky. a bug in the rewriter would cascade to affect everyone
Unlikely, but let's go with what we know for the first release
ttyl
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 00:34
sure. I'll build it on my main machine with .net 4.6
It would be a good sanity check though
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 01:02
Hm.. I'm getting the same issue...
will reinstall it.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 01:12
Hm.. Didn't work any way
Are you sure you can select target framework v.4.6 from VS2013?
Or maybe I need to install something else, because just installing .net framework 4.6 is not enough
and I double check that I successfully install v4.6 (for instance, using following guidelines - https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx)
Sam Harwell
@sharwell
Jul 10 2015 01:33
what happened when you installed 4.6?
I'm running Visual Studio 2013 Update 4 for my work on this project
@SergeyTeplyakov HERE IT IS: Microsoft .NET Framework 4.6 RC Multi-Targeting Pack (Sorry for the prior confusion :worried: )
The .NET Framework 4.6 RC Multi-Targeting Pack is a package that enables developers to build applications targeting the .NET Framework 4.6 using either Visual Studio 2013, Visual Studio 2012 or third party IDEs. You need to download and install the .NET Framework 4.6 RC prior to installing the multi-targeting pack.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 02:13
Thanks! :clap:
Building...
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 02:20
Build passed!
Sam Harwell
@sharwell
Jul 10 2015 02:21
codeformatter is interesting
oh, did you see #105?
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 02:24
I'll merge this and rebuild it
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 02:49
building updated version...
Micah Zoltu
@MicahZoltu
Jul 10 2015 02:50
Once the 2015 release is ready, where will I be able to download it from? GitHub releases, codeplex downloads or Visual Studio extension manager?
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 02:51
github release - community preview. VSExtension manager and VS gallery if you need signed bits
Micah Zoltu
@MicahZoltu
Jul 10 2015 02:52
Excellent. Thanks!
Sam Harwell
@sharwell
Jul 10 2015 03:09
@SergeyTeplyakov I'm going to pause for a bit on the formatting PRs
They aren't too much work, but I want to make sure we agree on the approach.
I'm sending one project at a time because it's easy to redo a project if someone sends a pull request that we want to include and don't want merge conflicts.
The biggest deal is the commits themselves have Francesco as the Author so Git Blame returns the correct result.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 03:12
yep I'm going to put a comment about formatting rules. Another question is Git Blame, that's true
Sam Harwell
@sharwell
Jul 10 2015 03:13
I propose following the corefx formatting rules. Primary reason: my initial preference for the future home of CodeContracts is in the dotnet organization, and that's the rules they use.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 03:19
I'm ok with formatting rules themselves I'm more concerned that this is not enough... I would prefer more advanced manual formatting that I've described in the comment to #106
Any objections?
@sharwell I'm going to create a tag for the release
Sam Harwell
@sharwell
Jul 10 2015 03:21
This message was deleted
This message was deleted
what commit is the tag? (hash)
@SergeyTeplyakov I replied to your comment in #106. I don't see a commit yet which has the correct version numbers, so I'm concerned about the release tag. I'm guessing you just haven't pushed the commit yet?
Sam Harwell
@sharwell
Jul 10 2015 03:29
I'm AFK for an hour or so. Will check back before bed.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 03:31
Will crate in a second
Yep, I didn't created a PR
#110
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 08:35
I've applied PR, tested but was unable to release (1 a.m in the morning already)
But even with this fix I was unable to build Code Contracts with VS2015
#39 this fix was critical
if anyone would be able to check, would be appreciated.
I'll work on this bug: Microsoft/CodeContracts#112
Unit test added. Bug reproduced
Sam Harwell
@sharwell
Jul 10 2015 14:30
I've seen a few issues. I can't build tunnelvisionlabs/LangSvcV2 in debug mode but I can build it in release mode (the latter being a new ability of this release).
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 15:35
I'm back:)
Sam Harwell
@sharwell
Jul 10 2015 17:04
@SergeyTeplyakov Make sure you catch that I edited my last comment in #111. Previously I referred to CoreTaskExtensions.Catch, but I believe CoreTaskExtensions.Finally is a better option since it passes through the return value from the antecedent unchanged.
I'm headed to lunch ttyl
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 17:14
Have a good lunch!
I've replied in the comment and will duplicated the idea here. Because rewriter operates on IL level I think there should be clear benefits of changing current logic. Like switching to TaskCompletionSource is super simple when dealing with C#, but not so simple when you need to do this from IL. So it should be clear benefits to do this. Maybe I missing something, but I can't see them right now...
Sam Harwell
@sharwell
Jul 10 2015 19:08
@SergeyTeplyakov The rewriter is changing the semantics of asynchronous methods in a way that breaks exception handling. If you have a catch (MyException) in your code that works, enabling the rewriter will force you to catch (AggregateException) instead. Also it breaks cancellation, turning all canceled tasks into faulted ones.
The only case it actually works for right now is tasks that run to completion.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 21:06
Yep. Agree!
Sam Harwell
@sharwell
Jul 10 2015 21:08
@SergeyTeplyakov for the next release, don't include a . in the tag between v and 1
The release notes link in the nuspec doesn't have a . there.
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 21:35
thanks
ok. will do
Sergey Teplyakov
@SergeyTeplyakov
Jul 10 2015 23:57
Ok. I've fixed #112