Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Publish new version of the nuget package #191

Closed
manne opened this issue Jan 28, 2020 · 16 comments
Closed

Publish new version of the nuget package #191

manne opened this issue Jan 28, 2020 · 16 comments
Assignees
Milestone

Comments

@manne
Copy link
Contributor

manne commented Jan 28, 2020

The nuget packages of the current version (0.6.1) have Microsoft.CodeAnalysis.CSharp in version 3.1.0.

<RoslynNugetVersion>3.1.0</RoslynNugetVersion>

For my SemanticType generator I want to incorporate "nullability". Similar as I implemented in #190 . In version 3.1.0 of Microsoft.CodeAnalysis.CSharp the nullability feature is not available. In version 3.4.0 the nullability feature is available. The current master branch targets this version.
<RoslynNugetVersion>3.4.0</RoslynNugetVersion>

Can a new version be published?

How can I help?

@amis92
Copy link
Collaborator

amis92 commented Jan 28, 2020

Well, there is a prerelease available as a hotfix.

Other than that, I was waiting for some feedback on whether the big changes I did lately are breaking or not, but I don't think a lot of people tried it out, looking at the downloads.

@manne
Copy link
Contributor Author

manne commented Jan 28, 2020

Well, there is a prerelease available as a hotfix.

Awesome. I missed checking this.

@louthy
Copy link

louthy commented Feb 4, 2020

@amis92

but I don't think a lot of people tried it out, looking at the downloads.

Some release notes would have been helpful here. I accidentally ended up including it in a rollout of language-ext, but reverted it when it was raised as an issue (the issue was purely including an alpha in the release dependencies, not bug reports of any issues). So, probably most of the downloads came from that.

I'm desperate to get the .NET Core 3 and netstandard2.1 compatibility, it's unfortunately holding back my project now. Are there any pre-release notes or plans for deploying by a particular date? (deployment-wise an idea of whether we're looking at a few months, or by the end of the year would be useful. For language-ext I may just have to look into other code-gen solutions if the deployment is likely to be toward the end of the year).

Sorry if this sounds demanding, I definitely don't want to give that impression. Obviously, as a maintainer of a popular open-source project myself I realise we're all doing this in our spare time, and very much appreciate the efforts :)

@amis92
Copy link
Collaborator

amis92 commented Feb 4, 2020

@louthy release notes should've been included, but it seems I've used wrong property:

<ReleaseNotes>https://github.com/AArnott/CodeGeneration.Roslyn/blob/master/CHANGELOG.md</ReleaseNotes>

Anyway, they're available in changelog.md in the root of the repo :) I've made #192 to fix it.


Are there any pre-release notes or plans for deploying by a particular date?

No such plans. I wanted to wait for some feedback. If you can confirm that 0.7.5 is good for you, and works correctly, I can just push it out. Also I wanted to write up a migration guide for generator authors, and never finished it. So if you have had any experience, please share.


get the .NET Core 3 and netstandard2.1 compatibility

Is the 0.7.5.-alpha ok for you, or do you need something more to be compatible?

@louthy
Copy link

louthy commented Feb 4, 2020

@amis92 Thanks for the quick response, I thought I'd do some testing to help get it moving along. I have submitted an issue

@amis92
Copy link
Collaborator

amis92 commented Mar 25, 2020

Note: A major step forward towards stabilizing 0.7 is a refactor PR #198.

@amis92 amis92 added this to the 0.7 milestone Mar 26, 2020
@amis92 amis92 self-assigned this Mar 26, 2020
@amis92
Copy link
Collaborator

amis92 commented Apr 7, 2020

I've published v0.7.57-alpha to nuget.org.

This is a stabilization release, if you can migrate to it successfully, I'll release it as stable/public.

This includes new set of Templates, fixes in Sdks and other bugfixes.

If you have any problems, please raise them and I'll try to help ASAP.

@louthy @garyng

@manne
Copy link
Contributor Author

manne commented Apr 7, 2020

@amis92

This is a stabilization release, if you can migrate to it successfully, I'll release it as stable/public.

with v0.7.57-alpha it is working

@garyng
Copy link

garyng commented Apr 8, 2020

Is <NoBuild>true</NoBuild> required on the metapackage project file?

The example on the readme has, but the template didnt:

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

@amis92
Copy link
Collaborator

amis92 commented Apr 8, 2020

Yeah so it's optional - it's a standard property which is the same as if you passed --no-build to dotnet pack.

Essentially, it prevents building this project, allowing only Restore/Pack.

I'll remove it from the readme, since it causes dotnet build on solution to fail. Good catch.

@garyng
Copy link

garyng commented Apr 8, 2020

Uhmmm, I can't get the generator working...
The sample project is here: https://github.com/garyng/cgr-test (which is created using the cgrplugin template).

The generator simply calls Debugger.Launch(): https://github.com/garyng/cgr-test/blob/b6b208ec76e002af196c1bc1f21a7b8d7936ffba/LanguageExt.CodeGen.Generators/Generator1.cs#L18-L22

The Consumer project uses the metapacakge: https://github.com/garyng/cgr-test/blob/b6b208ec76e002af196c1bc1f21a7b8d7936ffba/Consumer/Consumer.csproj#L8-L10, but it's not working...

The ConsumerWorking project references the Attributes, Generators and the codegen tool, which works: https://github.com/garyng/cgr-test/blob/b6b208ec76e002af196c1bc1f21a7b8d7936ffba/ConsumerWorking/ConsumerWorking.csproj#L8-L18

Am I doing it right?

@amis92
Copy link
Collaborator

amis92 commented Apr 8, 2020

@garyng the metapackage is not suitable for P2P references - it only produces a NuGet that pulls in correct dependencies - but only as NuGet.

Do you think this should be documented somewhere? If so, can you point to a good spot for it?


So, for local/P2P scenarios, you need to do it the way ConsumerWorking is set up. That, or pack your generator projects, and in a separate build step, the Consumer should have local NuGet source pointing to the output folder with nupkg files you produced, and build it after these packages are created.

I strongly recommend the first approach (ConsumerWorking as it is now), except if you're testing whether metapackage is set up correctly. In that case, refer to how the MetapackageSample here is done.

@garyng
Copy link

garyng commented Apr 8, 2020

@amis92 I think the difference between P2P reference and nuget reference should be documented, maybe in the metapackage section of readme?

@amis92
Copy link
Collaborator

amis92 commented Apr 8, 2020

I've added a note with warning sign at the end of the section: https://github.com/AArnott/CodeGeneration.Roslyn#create-the-metapackage

@garyng
Copy link

garyng commented Apr 8, 2020

I didn't realize that! Was going to make a PR just now.

@amis92
Copy link
Collaborator

amis92 commented Apr 8, 2020

Aaand the stable release is out: https://github.com/AArnott/CodeGeneration.Roslyn/releases/tag/v0.7.63

@amis92 amis92 closed this as completed Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants