Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Schema.NET.Pending project for pending types #302

Merged
merged 5 commits into from
Jun 23, 2021

Conversation

Turnerj
Copy link
Collaborator

@Turnerj Turnerj commented Jun 21, 2021

Will close #203

The core changes:

  • New "Schema.NET.Pending" project
  • All the C# source files for Schema.NET have been moved to a "common" folder and referenced by it and the new project
  • Minor changes to the source generator to pull in a setting about including pending types

I don't think I have this quite right yet (particularly around pulling in the setting) but is the general gist of the changes required to support pending types.

Once #301 is in, it will make debugging this easier and then hopefully we can get full pending types supported!

@Turnerj Turnerj added enhancement Issues describing an enhancement or pull requests adding an enhancement. major Pull requests requiring a major version update according to semantic versioning. labels Jun 21, 2021
@Turnerj Turnerj requested review from RehanSaeed and removed request for RehanSaeed June 21, 2021 13:56
@Turnerj Turnerj marked this pull request as draft June 21, 2021 13:57
@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 22, 2021

A quick look suggests we might need another variation of our Values type with a different number of generic arguments. Will need to dig into this further.

Turnerj added 3 commits June 23, 2021 13:38
We can't share the value because the data is different between projects. It does mean each target framework will re-process the data though that isn't a huge issue.
@Turnerj Turnerj changed the title WIP: Create Schema.NET.Pending project for pending types Create Schema.NET.Pending project for pending types Jun 23, 2021
@Turnerj Turnerj marked this pull request as ready for review June 23, 2021 05:25
@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 23, 2021

I've got it working! The builds will take about 2x longer now (likely also making Visual Studio a little more sluggish) but we get the functionality we want.

@Turnerj Turnerj requested a review from RehanSaeed June 23, 2021 05:27
@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 23, 2021

Once we've got this in, should we release a new version (and thus the first version of Schema.NET.Pending)?

@Turnerj Turnerj merged commit f14c0e3 into RehanSaeed:main Jun 23, 2021
@Turnerj Turnerj deleted the pending-types branch June 23, 2021 09:03
@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 24, 2021

Just want to make sure before I create a new release that the NuGet key you've configured for the repo has the "Create new packages" permission. I've had issues before of not doing that and then manually having to remove tags/releases and re-running it.

@RehanSaeed
Copy link
Owner

Write permissions for GitHub packages are in the build:

image

I recently switched to using this least priviledge approach for all my repos and defaulted to read rights in settings:

image

Only downside is that autolabeller seems to have stopped working and I have no idea why:

release-drafter/release-drafter#869

@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 24, 2021

Ahhhh, sorry, I meant permissions in NuGet.org itself. So when you have your API key in NuGet, you get a screen like this:

image

What I'm referring to is whether you have "Push new packages and package versions" or whether it is "Push new package versions". With our "Schema.NET.Pending" library, it will need that unless you want to upload the first package for it manually.

@RehanSaeed
Copy link
Owner

Oh I see. I have one key per project and get notified when they expire, so we won't have that problem.

@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 25, 2021

Looks like we might have missed something. The Schema.NET.Pending package didn't push to NuGet and the one that pushed to GitHub Packages isn't correctly versioned... 🤔

@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 25, 2021

I think the MinVerTagPrefix is what caused the issue. It is <MinVerTagPrefix>$(PackageId).</MinVerTagPrefix> which won't work anymore with two packages with two different names (unless you want to do two tags per release - one Schema.NET.<version> and another Schema.NET.Pending.<version>).

@RehanSaeed
Copy link
Owner

Fixed in #303. Will delete the tag and re-release. Annoying but required.

@Turnerj
Copy link
Collaborator Author

Turnerj commented Jun 25, 2021

Cheers mate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues describing an enhancement or pull requests adding an enhancement. major Pull requests requiring a major version update according to semantic versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add VirtualLocation type
2 participants