Giter Club home page Giter Club logo

Comments (14)

enricosada avatar enricosada commented on August 18, 2024

I am debugging this , it's very annoying on the solution FSharp

I'll try to fix it, assign it to me

from fsharp.

latkin avatar latkin commented on August 18, 2024

@enricosada thanks for taking this. You just need to update here with well-known item capability similar to here.

from fsharp.

latkin avatar latkin commented on August 18, 2024

It's yours, assigning to myself until we have the ability to assign outside of Microsoft org.

from fsharp.

enricosada avatar enricosada commented on August 18, 2024

i cannot repro.

tried with latest ( master branch ) with ad hoc solution and fsharp.sln .
The up-to-date is correct.

I was trying to fix fsharp solution useless rebuild, but this seem ok.

i tried to:

  • change generated app.config -> up-to-date
  • change original app.config -> up-to-date
  • use a Content "file.txt" (with CopyNever, CopyIfNewer, CopyAlways) -> ok

from fsharp.

rojepp avatar rojepp commented on August 18, 2024

@enricosada What do you mean when you say 'up-to-date'?

Expected behavior:

  • Original app.config changed -> causes rebuild of project
  • Generated app.config changed -> no rebuild
  • "file.txt" changed -> Rebuild for CopyIfNewer, CopyAlways

from fsharp.

enricosada avatar enricosada commented on August 18, 2024

thx @rojepp i'll try your test case

from fsharp.

enricosada avatar enricosada commented on August 18, 2024

ok i can repro now, thx

  • open solution
  • build -> build success
  • build -> up to date
  • change original app.config
  • build -> build success
  • build -> build success ( ❗ expected up to date )

from fsharp.

rojepp avatar rojepp commented on August 18, 2024

@latkin contributed a fix for that, and I verified it in 3.1.2, so I'm surprised by that.
The remainder of the issue was that generated app.config wasn't considered an output of the build, meaning if generated app.config is older than original app.config it wouldn't cause a rebuild.

If you're going to be working on this, I have to say this registry tip is invaluable: What causes a rebuild in MSBuild

from fsharp.

rojepp avatar rojepp commented on August 18, 2024

@enricosada That tip will show files in input and output buckets with their modified times. AFAIR generated app.config is in the wrong bucket (input instead of output) causing strange rebuilds.

from fsharp.

rojepp avatar rojepp commented on August 18, 2024

The issue from codeplex above is truncated, and the original issue is gone.

from fsharp.

enricosada avatar enricosada commented on August 18, 2024

really thx @rojepp i'll add the registry tip to the wiki, is very nice to know

from fsharp.

latkin avatar latkin commented on August 18, 2024

Yes, F# impl looks at reg key @rojepp mentioned, and logs info to the output window about the files it's looking at and their timestamps. This is the first step to debugging.

Behavior today should be as follows (and I added tests for this, so if it's not working, it needs to be investigated). Assuming everything is built fresh and up-to-date:

  • ✅ Modifying app.config source does trigger dirty state and causes rebuild.
    • This was originally not working, and that's what this bug was opened for. I fixed it.
  • ❌ Modifying myapp.exe.config output file does not trigger dirty state, will still report "up-to-date"
    • @rojepp noticed this was still not working, so we are looking at it now

Note: C# proj sys has same behavior as us for No. 2 (and always has), so it's not a big deal if we don't fix this.

Thinking about it, it might be tricky. Even if we declare the project dirty and MSBuild runs, I'm not sure that MSBuild is smart enough to re-create the myapp.exe.config file. @enricosada you will have to poke around a bit.

from fsharp.

latkin avatar latkin commented on August 18, 2024

AFAIR generated app.config is in the wrong bucket (input instead of output) causing strange rebuilds.

Generated myapp.exe.config is not in any bucket, it's not tracked at all right now, that's the problem. Source app.config is (now) in proper Input bucket.

from fsharp.

enricosada avatar enricosada commented on August 18, 2024

an update, working on it (i need to end the other pr before this one).

I am trying to fix without a special case on app.config

the rules are msdn Incremental Builds and msdn How to: Build Incrementally

an useful item metadata list and project properties

the input, output can be inferred by OriginalItemSpec and FinalOutputPath metadata

the build output group are:

  • Built
  • ContentFiles
  • LocalizedResourceDlls
  • Documentation-
  • Symbols
  • SourceFiles
  • XmlSerializer

for example:

app.config

  • OriginalItemSpec = "App.config"
  • FinalOutputPath = "C:\path\to\project\bin\Debug\ConsoleApplication1.exe"

.pdb (Symbols)

  • FinalOutputPath = "C:\path\to\project\bin\Debug\ConsoleApplication1.pdb"
    but no OriginalItemSpec, so need check with all source files

Content items

  • CopyToOutputDirectory = "PreserveNewest"
  • TargetPath = "readme.txt"

so this group need a special case i think, but as group no single item

from fsharp.

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.