8000 Enable first unit tests for InterfaceStubGenerator by sharwell · Pull Request #1045 · reactiveui/refit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Enable first unit tests for InterfaceStubGenerator #1045

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

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

sharwell
Copy link
Contributor

No description provided.


namespace Refit.Tests
{
public static partial class CSharpSourceGeneratorVerifier<TSourceGenerator>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This file would normally contain helpers for the most common cases, but we haven't identified those yet for source generators.

Comment on lines +25 to +27
static readonly MetadataReference RefitAssembly = MetadataReference.CreateFromFile(
typeof(GetAttribute).Assembly.Location,
documentation: XmlDocumentationProvi 8000 der.CreateFromFile(Path.ChangeExtension(typeof(GetAttribute).Assembly.Location, ".xml")));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This would be better if we could reference a NuGet package (where it would automatically detect the proper TFM to reference and include the corresponding dependencies), but that would restrict the tests to using a Refit build available on NuGet.

@clairernovotny
Copy link
Member

Looks like there are test failures here?

@sharwell
Copy link
Contributor Author

Do you have a preference regarding #1045 (comment)? The options are:

  1. Run the SG test against a build of Refit from NuGet, and have it automatically configure all the necessary references
  2. Run the SG test against the actual build of Refit from the current repository, but need to set up the references as part of each test configuration

@clairernovotny
Copy link
Member

Seems like 2 is better since we the CI feed would always be N-1 of the current, so there'd be no way to validate things before a commit?

@sharwell
Copy link
Contributor Author

The tests are now updated.

@clairernovotny
Copy link
Member
clairernovotny commented Jan 31, 2021

@sharwell
Copy link
Contributor Author
sharwell commented Feb 1, 2021

I'm seeing two test failures?

I'm not seeing this locally, and the CI output isn't public so I'm not sure yet where the difference lies.

Are we referencing NuGet.Protocol anywhere here in the closure where this matters?

Yes, the test library uses NuGet to resolve package dependencies.

@clairernovotny
Copy link
Member

The build/test output is public but ADO is being silly when you've already logged into a different ADO tenant. If you open the ADO link with an InPrivate window, you'll be able to see it.


static InterfaceStubGeneratorTests()
{
#if NET5_0_OR_GREATER
Copy link
Contributor Author
@sharwell sharwell Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ Looks like this (specifically the _OR_GREATER form) was added for the 5.0.2xx SDK, but the CI is using 5.0.1xx.

@clairernovotny
Copy link
Member

Good catch, we both have the 200 preview SDK's locally 😂

@clairernovotny clairernovotny merged commit 2d91705 into reactiveui:main Feb 2, 2021
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
@sharwell sharwell deleted the test-lib branch April 13, 2023 13:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0