Git Product home page Git Product logo

Comments (19)

Smaug123 avatar Smaug123 commented on May 25, 2024 1

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.

Smaug123 avatar Smaug123 commented on May 25, 2024 1

Let me set up a toy repo and try it.

from fscheck.

Smaug123 avatar Smaug123 commented on May 25, 2024 1

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.

Smaug123 avatar Smaug123 commented on May 25, 2024 1

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.

Smaug123 avatar Smaug123 commented on May 25, 2024 1

I'll put it in an env var instead.

from fscheck.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024
// 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.

Smaug123 avatar Smaug123 commented on May 25, 2024

Are you observing that? I see the correct bound.
Screenshot 2024-02-25 at 10 54 57

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.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024

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.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024

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

image

from fscheck.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024

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.

Smaug123 avatar Smaug123 commented on May 25, 2024

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.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024

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.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024

Fixed up the release manually for now, no rush. Stepping away from computer now for a while.

from fscheck.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024

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.

Smaug123 avatar Smaug123 commented on May 25, 2024

Fair enough!

from fscheck.

kurtschelfthout avatar kurtschelfthout commented on May 25, 2024

I can try to avoid commas in the release notes ;)

from fscheck.

Smaug123 avatar Smaug123 commented on May 25, 2024

On the plus side, Appveyor does now catch that error! https://ci.appveyor.com/project/kurtschelfthout/fscheck/builds/49266851

from fscheck.

Smaug123 avatar Smaug123 commented on May 25, 2024

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:
Screenshot 2024-02-25 at 20 36 41
https://github.com/jstedfast/MimeKit/blob/4315487b9b469efd93d53c998f145b501e6d55f4/nuget/MimeKit.nuspec#L29

But I can't get them in there.

from fscheck.

Smaug123 avatar Smaug123 commented on May 25, 2024

Gone with some truly amazing hacks (#672)

from fscheck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.