Compiling DotNetOpenAuth - dotnetopenauth

I am trying to build DotNetOpenAuth and there are some build errors. I am curious if those errors are actually generic. I downloaded the code and it loads in VS.NET 2010 just fine except that in compilation it relies on GithubCommitId's.
The problem happens when this line is used in the build script:+build.$(BuildNumber).$(GitCommitId.Substring(0,10))
Here is the build log.
------ Rebuild All started: Project: Mono.Math, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.Core, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: Org.Mentalis.Security.Cryptography, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.OAuth.Common, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.OAuth2, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.OAuth, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.InfoCard, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.Core.UI, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.OAuth2.Client, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.OAuth.Consumer, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.OAuth.ServiceProvider, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.OAuth2.AuthorizationServer, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: DotNetOpenAuth.InfoCard.UI, Configuration: Debug Any CPU ------
C:\Users\Administrator\Desktop\AArnott-dotnetopenid-6c29eba\tools\DotNetOpenAuth.Versioning.targets(29,4): error MSB4184: The expression """.Substring(0, 10)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length
------ Rebuild All started: Project: RelyingPartyDatabase, Configuration: Debug Any CPU ------
PS: this has been posted on GitHub as well as issue #88.

As mentioned in Issue 88, the workaround is to download the source repository using git rather than as a .zip file.
The issue is still open, pending a fix to the build authoring so that it doesn't require git to be present.

Related

Is there a way to improve starlark's unittest error reporting?

I'm writing analysis-time tests for my project as per https://docs.bazel.build/versions/master/skylark/testing.html and I'm wondering what the most useful way of reporting failures is.
Using the unittest.bzl module, I am using asserts.equals, asserts.true etc and find the error reporting in the logs somewhat lacking. For example, if an asserts.true fails the error message is Expected condition to be true, but was false, with no mention of which line, or what the condition it expected to be true was. In a file full of lots of tests, this isn't very useful! I'm aware one can add a message as an argument to these assertions, but having tailored messages for every assertion doesn't feel ideal either. Is there a way to get at the backtrace caused by the assertion failure at all? Or any other way of accessing the line number/details of assertion failure?
I took the minimal example from your link and added the latest Skylib release to a new WORKSPACE. I then changed the expected value in _provider_contents_test_impl to make the test fail.
Below is the full output, note the DEBUG that contains a lot of useful info (file, line, expectation, actual value).
$ bazel test //mypkg:myrules_test
DEBUG: /home/user/.cache/bazel/_bazel_user/863abec759a50d843603ddf033727331/external/bazel_skylib/lib/unittest.bzl:351:10: In test _provider_contents_test_impl from //mypkg:myrules_test.bzl: Expected "some valuexxxxx", but got "some value"
INFO: Analyzed target //mypkg:provider_contents_test (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
FAIL: //mypkg:provider_contents_test (see /home/user/.cache/bazel/_bazel_user/863abec759a50d843603ddf033727331/execroot/__main__/bazel-out/k8-fastbuild/testlogs/mypkg/provider_contents_test/test.log)
Target //mypkg:provider_contents_test up-to-date:
bazel-bin/mypkg/provider_contents_test.sh
INFO: Elapsed time: 0.108s, Critical Path: 0.04s
INFO: 2 processes: 2 linux-sandbox.
INFO: Build completed, 1 test FAILED, 2 total actions
//mypkg:provider_contents_test FAILED in 0.0s
/home/user/.cache/bazel/_bazel_user/863abec759a50d843603ddf033727331/execroot/__main__/bazel-out/k8-fastbuild/testlogs/mypkg/provider_contents_test/test.log
INFO: Build completed, 1 test FAILED, 2 total actions
Tracebacks are also supported, see this bug report for example.
tion, actual value).
$ bazel test //mypkg:myrules_test
DEBUG: /home/user/.cache/bazel/_bazel_user/863abec759a50d843603ddf033727331/external/bazel_skylib/lib/unittest.bzl:351:10: In test _provider_contents_test_impl from //mypkg:myrules_test.bzl: Expected "some valuexxxxx", but got "some value"
INFO: Analyzed target //mypkg:provider_contents_test (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
FAIL: //mypkg:provider_contents_test (see /home/user/.cache/bazel/_bazel_user/863abec759a50d843603ddf033727331/execroot/__main__/bazel-out/k8-fastbuild/testlogs/mypkg/provider_contents_test/test.log)
Target //mypkg:provider_contents_test up-to-date:
bazel-bin/mypkg/provider_contents_test.sh
INFO: Elapsed time: 0.108s, Critical Path: 0.04s
INFO: 2 processes: 2 linux-sandbox.
INFO: Build completed, 1 test FAILED, 2 total actions
//mypkg:provider_contents_test FAILED in 0.0s
/home/user/.cache/bazel/_bazel_user/863abec759a50d843603ddf033727331/execroot/__main__/bazel-out/k8-fastbuild/testlogs/mypkg/provider_contents_test/test.log
INFO: Build completed, 1 test FAILED, 2 total actions
Tracebacks are also supported, see this bug report for example.
Note that asserts.equals will print the actual value on failure, but asserts.true will not - but you can easily work around this by using asserts.equals(env, True, test_val, msg) instead.

Dart Editor not launching referenced project

In project a's pubspec, I have this code to import stuff from project b:
dependencies:
project_b:
path: /home/vilix/Program Files/Dart/workspace/project_b
project_b is a library and so everything is in a lib forlder. After saving pubspec from project_a, Pub Get starts working and get's all the dependencies (even devendencies needed for project_b) to project_a. After I try launching it, nothing really happens (only two lines in the console about starting pub serve and loading source assets) and after about 30 seconds the console says that there is exhausted heap space. In interval of about 5 seconds it tries to allocate more and more. After 96 bytes a warning dialog pops out saying: Could not start pub serve or connect to pub
Console output:
--- 9:06:37 PM Starting pub serve : project_a ---
Loading source assets...
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 64 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 96 bytes.
Unhandled exception:
Out of memory
Please note that I am not even using any of those packages, just having it in pubspec.yaml file and in packages folder of project_a.
pubspec.yaml of project_a
name: sample
description: A sample web application
dependencies:
project_b:
path: /home/vilix/Program Files/Dart/workspace/project_b
pubspec.yaml of project_b
name: project_b
version: 0.0.1+11
author: name + email
description: description
homepage: homepage
environment:
sdk: '>=1.6.0'
dependencies:
browser: '>=0.10.0+2 <0.11.0'
crypto: '>=0.9.0 <1.0.0'
I have the same problem if one of my packages has a symbolic link to packages.
Apparently pub goes into an endless loop.
I have opened a bug report:
https://code.google.com/p/dart/issues/detail?id=21031
Might not be your problem.
Sounds very similar to this issue http://dartbug.com/21006 or http://dartbug.com/19659.

building dart on windows: build failed

I'm trying to build the dart-vm on windows. I followed all steps described here https://code.google.com/p/dart/wiki/PreparingYourMachine and here https://code.google.com/p/dart/wiki/Building
When i try to execute the build.py script, i get the following error:
D:\_dev\workspace-vs\dart-repo\dart\tools>python build.py runtime
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\\devenv.com /build DebugX64|x64 /project runtime dart.sln
Microsoft Visual Studio 2013 Version 12.0.21005.1.
Copyright (C) Microsoft Corp. All rights reserved.
The following files were specified on the command line:
dart.sln
These files could not be found and will not be loaded.BUILD FAILED
D:\_dev\workspace-vs\dart-repo\dart\tools>
Is it even possible to build the vm on a windows system?
edit:
ok, so now, after i updated all visual studio solution files to my 2013 version, i can at least start the build chain. but i still get some errors. it seems i am unable to generate the 'global_intermediate' files, following solutions trying to build depend on them and fail. any ideas?
1>------ Build started: Project: generate_async_cc_file, Configuration: ReleaseIA32 Win32 ------
2>------ Build started: Project: generate_corelib_cc_file, Configuration: ReleaseIA32 Win32 ------
3>------ Build started: Project: generate_async_patch_cc_file, Configuration: ReleaseIA32 Win32 ------
4>------ Build started: Project: generate_collection_cc_file, Configuration: ReleaseIA32 Win32 ------
5>------ Build started: Project: generate_collection_patch_cc_file, Configuration: ReleaseIA32 Win32 ------
6>------ Build started: Project: generate_convert_cc_file, Configuration: ReleaseIA32 Win32 ------
7>------ Build started: Project: generate_convert_patch_cc_file, Configuration: ReleaseIA32 Win32 ------
8>------ Build started: Project: generate_typed_data_patch_cc_file, Configuration: ReleaseIA32 Win32 ------
2> Generating ..\build\ReleaseIA32\obj/global_intermediate/corelib_gen.cc file.
2> The system cannot find the path specified.
4> Generating ..\build\ReleaseIA32\obj/global_intermediate/collection_gen.cc file.
4> The system cannot find the path specified.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.
4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.
3> Generating ..\build\ReleaseIA32\obj/global_intermediate/async_patch_gen.cc file.
3> The system cannot find the path specified.
9>------ Build started: Project: generate_corelib_patch_cc_file, Configuration: ReleaseIA32 Win32 ------
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.
10>------ Build started: Project: generate_internal_cc_file, Configuration: ReleaseIA32 Win32 ------
1> Generating ..\build\ReleaseIA32\obj/global_intermediate/async_gen.cc file.
10> Generating ..\build\ReleaseIA32\obj/global_intermediate/internal_gen.cc file.
10> The system cannot find the path specified.
1> The system cannot find the path specified.
solved. see https://code.google.com/p/dart/issues/detail?id=20023 for more info how to build on vs2013.

DirectX11 Setup error

I have Frank D Lunas directx11 book, and i'm trying to set it up using VS2012, but i've run into this:
1>------ Build started: Project: FirstProject, Configuration: Debug Win32 ------
1>TRACKER : error TRK0002: Failed to execute command: "C:\Users\Josh\Documents\Applications\DirectX\Utilities\bin\x64\fxc.exe /nologo /Emain /Fo "C:\Users\Josh\Documents\DirectX\Chapter 1\Projects\FirstProject\Debug\color.cso" /Od /Zi FX\color.fx". The handle is invalid.
1>
1>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
and I have no idea how to fix it.
I believe I have all the paths correct, and included files.
Any ideas?
Thanks!

TFS 2010/Msbuild fails, StackOverFlowException

I'm having trouble with an upgraded 2008 build. I'm using the Upgrade template.
Everything builds fine, but when I get to GetImpactedTests it crashes.
Anyone experienced something similar?
Can I turn off GetImpactedTests? Can't find a property for it.
TF270015: 'MSBuild.exe' returned an unexpected exit code. Expected '0'; actual '255'.
From the build log:
CoreGetChangesetsAndUpdateWorkItems:
TeamFoundationServerUrl="http://ourserver:8080/tfs/DefaultCollection" BuildUri="vstfs:///Build/Build/23071"
Analyzing labels Release_2.3.10301.14 and Release_2.3.10302.2.
GetImpactedTests:
TeamFoundationServerUrl="http://ourserver:8080/tfs/DefaultCollection" BuildUri="vstfs:///Build/Build/23071"
From the event log:
Process is terminated due to StackOverflowException.
Fault offset: 0x00000000000536ba
Faulting process id: 0xd14
Faulting application start time: 0x01cb772eb97a8234
Faulting application path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 2cb88eb5-e323-11df-8d1d-0050568d001c
I added /p:PerformTestImpactAnalysis=false for now, and it works

Resources