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

Avoid copying BHoM assemblies to BHoMUpgrader folder #266

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

pawelbaran
Copy link
Member

@pawelbaran pawelbaran commented Jul 1, 2024

Issues addressed by this PR

Closes #265

Test files

Theoretically it should be enough if versioning check passed, but I also added a super simple manual test: just build this branch => rebuild BHoM and Versioning_Toolkit => check if C:\ProgramData\BHoM\Upgrades\BHoMUpgrader73 gets populated as expected => run script from here.

Changelog

Additional comments

@pawelbaran pawelbaran added the type:bug Error or unexpected behaviour label Jul 1, 2024
@pawelbaran pawelbaran self-assigned this Jul 1, 2024
Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change makes sense but there is an issue with missing dlls for MongoDB and CompilerServices.Unsafe.

This is what the ProgramData folders give us for 7.2 vs 7.3:

image

Running the upgrader 7.3 from the console, does indeed give me an error for missing dll:
image

@pawelbaran
Copy link
Member Author

Running the upgrader 7.3 from the console, does indeed give me an error for missing dll:

Yeah I saw it, but thought it is OK taken versioning is always preceded by a call to LoadBHoMAssemblies(), which loads all required dependencies - that, however, I have only verified in GH and Revit.

Out of curiosity, did you call LoadBHoMAssemblies() prior to running versioning in your console app @adecler? I would argue the upgrader does not need to work as a standalone app as it only has meaning in the context of BHoM, i.e. let's remove MongoDB.Bson.dll from the upgraders to save a few MB in the installer size and ask the consumers to load BHoM before running versioning. Or is there a gap in my thinking?

@adecler
Copy link
Member

adecler commented Jul 2, 2024

Yes, the upgraders need to be able to work as stand alone. It worked within the BHoM only because versionWithPipe is currently set to false int the ToNew method.

@pawelbaran
Copy link
Member Author

I pushed a fix @adecler - simply added the missing assemblies as dependencies to BHoMUpgrader73 project.

@pawelbaran pawelbaran requested a review from adecler July 2, 2024 13:25
@adecler
Copy link
Member

adecler commented Jul 2, 2024

Thanks @pawelbaran, that does the trick. A bit strange that the explicit copy of dependencies is needed while it isn't in the other ones but I wouldn't loose sleep over it when there is a straightforward fix.

Final thing that might be good to do here while we have the chance: the BHoMUpgrader depends on Reflection-Engine, Serialiser_Engine, and Versioning_Engine but doesn't actually use them so it might be good to clean that up as well.

@pawelbaran
Copy link
Member Author

I removed all BHoM dependencies from the upgrader now 👍

@adecler
Copy link
Member

adecler commented Jul 3, 2024

I removed all BHoM dependencies from the upgrader now 👍

Thanks @pawelbaran , I don't see the commit though :-P.

@pawelbaran
Copy link
Member Author

Lol of course, because I did not push it before closing the machine 😃 Done now, sorry.

@pawelbaran
Copy link
Member Author

@BHoMBot check required

Copy link

bhombot-ci bot commented Jul 3, 2024

@pawelbaran to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 176 requests in the queue ahead of you.

Copy link
Member

@adecler adecler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All requested changes have been addressed. Happy to approve

@pawelbaran
Copy link
Member Author

@BHoMBot check copyright-compliance
@BHoMBot check ready-to-merge

Copy link

bhombot-ci bot commented Jul 3, 2024

@pawelbaran to confirm, the following actions are now queued:

  • check copyright-compliance
  • check ready-to-merge

@adecler adecler merged commit 9c89054 into develop Jul 3, 2024
9 of 10 checks passed
@adecler adecler deleted the Versioning_Toolkit-#265-AvoidCopyingBHoMAssemblies branch July 3, 2024 15:29
@BHoMBot BHoMBot mentioned this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BHoMUpgrader73 builds too many assemblies
2 participants