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

Fix project publish (or: Various project system fixes) #10983

Merged
merged 6 commits into from
Oct 9, 2024

Commits on Oct 8, 2024

  1. Fix open document comparer

    This was previously using the hash code of the document snapshot, therefore publishing every request. This meant
    we got publishes for old documents when they were superseded by newer ones.
    davidwengier committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    73d7601 View commit details
    Browse the repository at this point in the history
  2. Batch virtual document refreshes together

    The things receiving project events on the server side were all batching their work together, so quick
    remove-then-add sequences for documents would be merged together on the server side. Not doing that on
    the client side too just made it much harder for things to ever be in sync.
    davidwengier committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    934e638 View commit details
    Browse the repository at this point in the history
  3. Stop trying to guess which projects documents belong to

    When publishing, we see a project remove for obj/Debug, and move all files to the misc
    project, then we'd see a new project for obj/Release, and add that. That add would then
    cause us to go through all of the misc files, and add them to the first project that could
    possibly have them - in this case, adding them right back to obj/Debug.
    
    Generally speaking we shouldn't be guessing at anything with project info, but rather rely
    on correct input from systems. ie, if they add a project, they presumably will then follow
    up with telling us which documents are in it.
    davidwengier committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    0ad17e1 View commit details
    Browse the repository at this point in the history
  4. Remove previous publish data when documents are removed

    Now that snapshots are self-versioned, if we don't keep our "previously published data" clean we'll end up re-publishing versions of documents that are new on the client side, but not new on the server.
    davidwengier committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    0be4b13 View commit details
    Browse the repository at this point in the history
  5. Don't publish documents that have been subsequently removed from the …

    …project
    
    When all documents are removed from a project, if the imports file comes first, it will cause a recompile of all open razor files, even though they will themselves later on be removed.
    This didn't used to cause any issues during publish, because the generated document would
    be sent over, and later clobbered with a subsequent change. Now that documents are self-versioned, that subsequent change could be for a version number less than the removed document, and hence be thrown away. Plus it's wasted work.
    davidwengier committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    c9f1768 View commit details
    Browse the repository at this point in the history
  6. PR feedback

    davidwengier committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    c7d6c91 View commit details
    Browse the repository at this point in the history