Git Product home page Git Product logo

obsolete's Introduction

AppVeyor Chat on Gitter NuGet Status Patrons on Open Collective

Extensible tool for weaving .net assemblies

Manipulating the IL of an assembly as part of a build requires a significant amount of plumbing code. This plumbing code involves knowledge of both the MSBuild and Visual Studio APIs. Fody attempts to eliminate that plumbing code through an extensible add-in model.

This is the codebase of core Fody engine. For more information on the larger Fody project see https://github.com/Fody/Home.

See Milestones for release notes.

Already a Patron? skip past this section

Community backed

Fody requires significant effort to maintain. As such it relies on financial support to ensure its long term viability.

It is expected that all developers using Fody become a Patron on OpenCollective.

See Licensing/Patron FAQ for more information.

Gold Sponsors

Support this project by becoming a Gold Sponsor. A large company logo will be added here with a link to your website.

PostSharp

Silver Sponsors

Support this project by becoming a Silver Sponsor. A medium company logo will be added here with a link to your website.

G-Research Particular Software

Bronze Sponsors

Support this project by becoming a Bronze Sponsor. The company avatar will show up here with a link to your OpenCollective Profile.

Patrons and sponsors

Thanks to all the backers and sponsors! Support this project by becoming a patron.

Documentation and Further Learning

Contributors

This project exists thanks to all the people who contribute.

obsolete's People

Contributors

andreasohlund avatar bording avatar danielmarbach avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar seanfeldman avatar simoncropp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

obsolete's Issues

Extending ObsEx to handle a date

Hi,
Thanks for the great work!, extremely useful.

I have been thinking whether we could extend the ObsEx attribute to handle a date. May be a new attribute called "ObsBy", which has a date. (e.g)
[ObsoleteBy(EffectiveFromIsoDatePart = "2014-09-01", TreatAsErrorFromEffectiveFromIsoDatePart = true)]
public string PropertyWithExpiry { get; set; }

I work with an extremely large code base and we seems to leave code that should ideally be removed at certain point (certain release or after 3/4 months in trial).

I am just wondering this is something you would consider for your library.

Thanks, M.

Support Windows Phone 8.1 RT

There are now 2 editions of Windows Phone 8.1. Please add support for Windows Phone 8.1 RT (SL already works).

Fody package reference is broken

I see that you've updated to csproj packaging.

However, currently, the default value for PrivateAssets results in build targets/props and analyzers being excluded from transitive references:

image

That means if someone just installs the Obsolete.Fody package, the transitive reference to Fody won't work at all because the targets aren't added to the project.

I'd recommend adding PrivateAssets="none" to the package reference to fix this.

EditorBrowsableAttributeFinder failure just started happening

I've started seeing a weird failure on https://github.com/Particular/NServiceBus.AmazonSQS, on both the develop branch and Particular/NServiceBus.AmazonSQS#197

[Fody.WeavingTask] Fody: Could not enable HideObsoleteMembers due to problem finding EditorBrowsableAttribute. Disable HideObsoleteMembers and raise an issue detailing what runtime you are compiling against. Inner Exception:System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   at ModuleWeaver.FindFromTypes(Collection`1 typeDefinitions) in C:\projects\obsolete\Fody\EditorBrowsableAttributeFinder.cs:line 39
   at ModuleWeaver.FindSystemTypes() in C:\projects\obsolete\Fody\EditorBrowsableAttributeFinder.cs:line 27

It's happening for a netstandard2.0 build being run via msbuild.exe, but only on the build server. Building locally works fine. The net452 target in the same build also works fine.

We're running Fody 2.4.4 and Obsolete.Fody 4.3.7, but this just started happening even though we've been running with those versions.

I suspect there is something environmental going on. Given that Fody scans a lot of directories outside of the project, could it be picking up something from another build? Any ideas as to what I could go looking for that might be causing the failure?

log.txt

Updating package wipes out previous weavers configuration

I've just updated to the latest version of Obsolete.Fody and I'm also using the Costura weaver.

Before the update my FodyWeavers.xml looked like this:

<?xml version="1.0" encoding="utf-8"?>
<Weavers>
  <Costura>
    <IncludeAssemblies>
      Raven.Abstractions
      Raven.Client.Lightweight
    </IncludeAssemblies>
  </Costura>
  <Obsolete HideObsoleteMembers='true'/>
</Weavers>

After the update:

<?xml version="1.0" encoding="utf-8"?>
<Weavers>
  <Obsolete />
</Weavers>

I was expecting the update to recognise that there is already a FodyWeavers.xml and only update it if the weaver is not already there.

Version changes should go to next increment

So given

[ObsoleteEx(TreatAsErrorFromVersion = "2.1")]

The following should be created

[Obsolete("Will be treated as an error from version 2.0.0. Will be removed in version 3.0.0.")]

Compared to the previous incorrect behaviour of generating

[Obsolete("Will be treated as an error from version 2.0.0. Will be removed in version 3.1.0.")]

Allow excluding Obsolete attributes that should not be decorated with ObsoleteEx

There are scenarios when ObsoleteEx is not needed and plain Obsolete is required to have a "warning" forever (type that is public that cannot be removed, but also should not be used as an example).

Currently Fody generates a warning:

1>  Fody: Fody (version 2.1.2.0) Executing
1>MSBUILD : warning : Fody/Obsolete: The member `System.TimeSpan Library.Class::Property()` has an ObsoleteAttribute. You should consider replacing it with an ObsoleteExAttribute.

Would be nice to get rid of the warning for types/properties by opting out from Fody inspection.

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.