Comments (19)
That's the line, yep. You'll want this:
<PackageVersion Include="xunit.extensibility.execution" Version="[2.4.1, 3.0.0)" />
in Directory.Packages.props.
from fscheck.
Let me set up a toy repo and try it.
from fscheck.
Got it - I need to learn never to use anything other than SendAsync
, because all the helpers are liable to hide crucial information and this catches me out very regularly. The problem is https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28#user-agent ("you need a user agent").
I've raised the fix as #665 .
from fscheck.
Oh nooooo, it looks like dotnet pack
interprets commas in -p:PackageReleaseNotes=
:
The failed process call (note that this is almost all a command line):
Process 'dotnet' failed with nonzero exit code 1. Args: pack --configuration Release -p:Version=3.0.0-rc2 --output bin -p:PackageReleaseNotes=Breaking change: confusingly named `StringNoNnulls` is renamed to `StringNoNullChar`.
Breaking change: The operators `|@`, `@|` and `%>` are removed. Please use `Prop.label` instead.
Negative decimals are now also generated. (by Stephen Smith)
Relaxed FsCheck.Xunit's restriction on xUnit versions. (by Tom Rijnbeek)
Made `Gen.choose64` public.
Removed dependency on FAKE and paket in favor of standard .NET tools. (by Patrick Stevens)
Added more `ForAll` overloads for various `Task` types.
The collections types `NonEmptySet`, `NonEmptyArray` and `FixedLengthArray` now implemented `IEnnumerable` to avoid a call to `Get` in common scenarios..
Stdout of dotnet pack
:
MSBuild version 17.8.3+195e7f5a3 for .NET
MSBUILD : error MSB1006: Property is not valid.
Switch: `@|` and `%>` are removed. Please use `Prop.label` instead.
Negative decimals are now also generated. (by Stephen Smith)
Relaxed FsCheck.Xunit's restriction on xUnit versions. (by Tom Rijnbeek)
Made `Gen.choose64` public.
Removed dependency on FAKE and paket in favor of standard .NET tools. (by Patrick Stevens)
Added more `ForAll` overloads for various `Task` types.
The collections types `NonEmptySet`
For switch syntax, type "MSBuild -help"
from fscheck.
I'll put it in an env var instead.
from fscheck.
// I *believe* it is impossible to have a fixed (not floating) version number from a source reference
// via `dotnet pack`. Without this next bit, FsCheck.Xunit vA.B.C depends on >= FsCheck vA.B.C, not
// on FsCheck exactly at vA.B.C.
Have we also lost the NUnit (>= 3.13.1 && < 4.0.0)
now? It seems to have turned into NUnit (>= 3.13.1)
. Is there something in dotnet pack that can specify that like paket.template?
from fscheck.
Are you observing that? I see the correct bound.
And indeed when I unzip the FsCheck.NUnit.nupkg file and look at its nuspec, it correctly says:
<dependency id="FsCheck" version="[3.0.0-rc2]" exclude="Build,Analyzers" />
<dependency id="NUnit" version="[3.13.1, 4.0.0)" exclude="Build,Analyzers" />
from fscheck.
Ah, is it the line in Directory.packages.props
that does it?
<PackageVersion Include="NUnit" Version="[3.13.1,4.0.0)" />
That's alirght then.
Push worked btw, I just pushed rc2. But I think I messed up the xunit dependency restriction. Luckily there is no v3 of xunit so no harm no foul, I hope.
from fscheck.
This always fails with "Forbidden". I've regenerated my token. It has I think the right permissions (see below). I set the token as env variable in exactly the same way as NUGET_KEY, which works.
Clearly either my token is missing some permissions, or it's somehow not being passed correctly. I've checked the header and it looks fine, compared to the docs. https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
Any ideas?
use client = new HttpClient ()
client.DefaultRequestHeaders.Add ("Accept", "application/vnd.github+json")
client.DefaultRequestHeaders.Add ("X-GitHub-Api-Version", "2022-11-28")
client.DefaultRequestHeaders.Authorization <- AuthenticationHeaderValue ("Bearer", pat)
let postData = JsonSerializer.Serialize releaseSpec
use content = new StringContent (postData, Encoding.UTF8, "application/json")
use response = client.PostAsync($"https://api.github.com/repos/%s{gitOwner}/%s{gitName}/releases", content).Result.EnsureSuccessStatusCode()
let response = response.Content.ReadAsStringAsync().Result
let output = JsonSerializer.Deserialize<GitHubReleaseResponse> response
from fscheck.
Worked just now with a curl. So my token must be ok, it's just not being set in the header correctly somehow.
from fscheck.
Currently you're setting Authorization twice (client.DefaultRequestHeaders.Add ("Authorization", "2022-11-28")
) - that's my bad, you need to delete that line. Haven't worked out if that's the only problem yet.
from fscheck.
Yeah, did that, with that it didn't work at all. (See my commit on master just now). After that I get the Forbidden error.
from fscheck.
Fixed up the release manually for now, no rush. Stepping away from computer now for a while.
from fscheck.
Look at moving to NerdBank.GitVersioning;
From a quick look, this doesn't do what we want (i.e. read the release notes and pick up the version from there). It seems to require a separate json file with the verison in it. If that's the case, I'd prefer just keeping the fake dependency for this, I don't think it'll get in the way much.
from fscheck.
Fair enough!
from fscheck.
I can try to avoid commas in the release notes ;)
from fscheck.
On the plus side, Appveyor does now catch that error! https://ci.appveyor.com/project/kurtschelfthout/fscheck/builds/49266851
from fscheck.
Oh my god, MsBuild itself appears to perform XML escaping on the ampersands I am trying to use to perform XML escaping. If we can get XML-escaped lines in there then they will correctly be shown in the release notes:
https://github.com/jstedfast/MimeKit/blob/4315487b9b469efd93d53c998f145b501e6d55f4/nuget/MimeKit.nuspec#L29
But I can't get them in there.
from fscheck.
Gone with some truly amazing hacks (#672)
from fscheck.
Related Issues (20)
- Update docs with new `Arbitrary` API based on `ArbMap` HOT 6
- feat(FsCheck.Xunit): Support xUnit >= 2.5, < 3 HOT 1
- Modelbased testing? HOT 3
- Expose `Gen.choose64` HOT 1
- feat(FsCheck.NUnit): Support NUnit >= 4.0.0 HOT 1
- Model-based testing examples in C#? HOT 2
- Check.QuickAll does not find testables that return unit HOT 2
- Prop.filter (==>) executes property even if condition does not hold HOT 4
- `StringNoNulls` is passing a null? HOT 6
- FsCheck 3.0.0-rc1 in C# is ignoring Xunit property size values HOT 2
- FsCheck generating test objects in C# HOT 5
- FsCheck 3.0.0-rc1 XUnit Property attribute doesn't respect IAsyncLifetime HOT 1
- FsCheck 3.0.0 RC1 dependency on xunit.extensibility.execution is out of date by three minor versions. HOT 6
- Consider providing a more explicit implementation of `IArbMap` HOT 6
- No instances of class FsCheck.Testable+ITestable1[T] for type Microsoft.FSharp.Collections.FSharpList1[FsCheck.Property] HOT 3
- Packaging improvements HOT 8
- Add README to NuGet packages
- Tests not ending with custom shrinker HOT 5
- Wrong xUnit runner "xunit.execution.dotnet" chosen for .NET Framework property tests HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fscheck.