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

Pragma out obsolete warnings in generated code #8703

Closed
ajcvickers opened this issue Jun 2, 2017 · 1 comment
Closed

Pragma out obsolete warnings in generated code #8703

ajcvickers opened this issue Jun 2, 2017 · 1 comment
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@ajcvickers
Copy link
Member

While discussing #8654, one of the sticking points was that making the existing API obsolete would result in obsolete code in model snapshots. We could start preemptively pragmaing out obsolete warnings in this generated code so in the future as long as the obsolete code keeps working, we can do it without "breaking" generated code.

@ajcvickers ajcvickers changed the title Pragama out obsolete warnings in generated code Pragma out obsolete warnings in generated code Jun 5, 2017
@ajcvickers ajcvickers added this to the 2.0.0-preview2 milestone Jun 5, 2017
@bricelam
Copy link
Contributor

bricelam commented Jun 7, 2017

00000000000000_MyMigration.Designer.cs

partial class MyMigration
{
    protected override void BuildTargetModel(ModelBuilder modelBuilder)
    {
#pragma warning disable 612, 618
        // ...
#pragma warning restore 612, 618
    }
}

MyModelSnapshot.cs

partial class MyModelSnapshot : ModelSnapshot
{
    protected override void BuildModel(ModelBuilder modelBuilder)
    {
#pragma warning disable 612, 618
        // ...
#pragma warning restore 612, 618
    }
}

Look good?

@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 7, 2017
@ajcvickers ajcvickers modified the milestones: 2.0.0-preview2, 2.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants