Giter Club home page Giter Club logo

Comments (13)

forki avatar forki commented on May 30, 2024

Hi,

I don't think I understand your problem completely.
Can you please give more detail?

Cheers,
Steffen

from fake.

Slesa avatar Slesa commented on May 30, 2024

I've splittet AssemblyInfo.cs into two parts: AssemblyInfo.cs (with informations about each project) and VersionInfo.cs (global version information in src). Because the GUID (and all the bool flags like ComVisible) depend on the project, they would be defined twice, when Fake generates them for me.
GUID can probably be overwritten by an empty string within build.fsx, but ComVisible not. And it doesn't feel right to declare it globally, does it?

from fake.

forki avatar forki commented on May 30, 2024

There is a ReplaceAssemblyInfoVersions task. Does this help?

from fake.

Slesa avatar Slesa commented on May 30, 2024

I don't think so. When I use an empty Guid, it should not write it into the version info. I changed the behaviour of Fake to leave it empty by default. It would be left to discuss if this is ok or leads to problems.

But it does not help for the boolean values, as they are true/false - I cannot blank them afterwards, so they are written always.

from fake.

mausch avatar mausch commented on May 30, 2024

I think a possible solution would be making all fields in AssemblyInfoParams options, e.g. GenerateClass: bool option.
Then the task would only generate output for the fields that are Some x.
Of course, it's a breaking change...

from fake.

Slesa avatar Slesa commented on May 30, 2024

Suggestion: can't the flags changed into nullable bools? And can they set to null by default, and they have to be set when they should be written? Still a breaking change, but...

from fake.

mausch avatar mausch commented on May 30, 2024

@Slesa yup, that's precisely what I was suggesting... F# devs prefer options to nullable types as they're more general.

from fake.

Slesa avatar Slesa commented on May 30, 2024

@mausch I should have read the stackoverflow article more attentively, sorry :-)

from fake.

forki avatar forki commented on May 30, 2024

Ok now I understand it.

Actually I think options would be a good solution. The breaking change is not that big since most scripts don't change the defaults. At least none of my 50 scripts. ;-)

from fake.

forki avatar forki commented on May 30, 2024

what do you think? is this enough?

from fake.

Slesa avatar Slesa commented on May 30, 2024

Looks cool, thank you very much. I will try it, but it should work this way.

from fake.

forki avatar forki commented on May 30, 2024

I had to change the GUID again, because this breaks all my scripts ;-) Sorry.

forki@e8f4bd6

But you should still be able to opt out by overwriting the Guid with string.empty.

from fake.

Slesa avatar Slesa commented on May 30, 2024

Works great

from fake.

Related Issues (20)

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.