-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update of toolkit postbuild and project references strategy #5
Comments
Looks very good to me. I built BHoM_UI yesterday for another PR/test, and this morning had another task to do with an unrelated bit of the code/tools that had broken - as is difficult to maintain all repo's sync'd. So two massive thumbs up from me! |
Capturing issues to address as discussed with @IsakNaslundBh and others this morning. A. Locking dlls will be more common A. Locking dlls will be more common. In practical terms this means Excel, Grasshopper etc. will need to be closed at the time of compiling any toolkit (not just at the time of compiling BHoM_UI as is currently the case) Personally, and from discussions today, I think this is a fine compromise to facilitate the benefit of centralised .dlls. I think the loss of the fringe case is OK to facilitate the centralisation. But good to hear others thoughts as always? Finally options to explore forced unloading of BHoM and .dlls from UIs. However challenges potentially with implementing consistently and so would not put this as critical for implementing this issues proposed changes. B. Versioning_Toolkit and current postbuild event mining upgraders in BHoM_UI In the immediate term I think we have a couple of options which will simply require developers to do one of two things to maintain and ensure their versioning is up to date. i. Continue to rebuild the BHoM_UI last - triggering the the remaining CopyUpgrades parts of the current or ii. frequently use the latest alpha installer to get all the up to date .dlls, datasets and versioning files. N.B. As discussed, this second is something we will be wanting to encourage more and more for developers anyway, so users and coders are using same end product. A separate question is should we migrate responsibility for the current versioning post builds to the Versioning_Toolkit? So developers doing versioning will need to call Versioning_Toolkit instead? In medium term it will be useful to explore if the actual post build tasks of converting raw .json and aggregating could be done at run time for the current live milestone. At end of milestone we can then still "lockdown" the aggregated .json into binary - so no longer editable and start afresh. If we think the above medium term plan is a good idea - I might suggest we just leave responsibility of versioning migration to BHoM_UI for these final sprints of 3.2 while we sort the above non-versioning related tasks. To look at wider plans for next improvements to versioning in 3.3 Thoughts @IsakNaslundBh @adecler all (P.S. sorry for long post 📃 ) TL;DRA. Don't worry too much about locking .dlls 😄 |
All sounds good 👍 One more potential issue just came to my head: it is a good practice to stick to a single BHoM build/version per project, for obvious reasons. This may become problematic once the assemblies will be shared by many users or admin rights will be required. Possibly it could be worth considering to allow multiple BHoM versions per machine? Manifest files (.gha, .addin, etc.) could sit in AppData per user then, pointing to the user's preferred version in ProgramData. First blocker I see for such approach is Dynamo, where all files are copied over to its dedicated folder. However, as far as I remember, there should be a way to hack the .dll paths - maybe @adecler could say more? |
Thanks @pawelbaran - good point raised about having multiple parallel versions of BHoM installed simultaneously. As discussed together - the use case of different versions of BHoM running simultaneously in different UI (say Excel vs GH vs Dynamo) - is actually prob one we want to explicitly avoid - to minimise unforeseen behaviour/user error. With installers now relatively easy (and hopefully getting easier still!) to reinstall previous versions and upgrade/downgrade - suggesting we park parallel versions of BHoM for now. A version of your proposed solution could be possible - but perhaps to be revisited if any future demand or user need is flagged. Hope makes sense? |
Agreed with OP. This looks like a great simplification of the current solution so always up for that 😄. I would move versioning post build to the versioning toolkit. We're dealing with static json files here so build order is not an issue. There is just a new need to remember to build the versioning toolkit if the json files have been modified but I can live with that. More and more I want to keep the location of the UI dlls a separate thing from the other dlls. Keeping UIs completely separate from each other is something that we want and even need to reduce issues of conflict and incorrectly exposing things from other UIs. This obviously doesn't mean that we have to copy all dlls to each UI folder like we do now. we could better leverage the PATH system variable for that. |
Following this morning discussion - the following plan has been agreed for actioning this issue. Pre-workto be completed in advance of 13:00 UTC Wed 03 June
Update of individual UIs
Update of compliance checks to assist in upcoming PRs, as well as beyond
Workshop actionsto be completed from 08:30 UTC Thursday 03 June onwards
Post workshop and completion of this issueNew issues to be raised specifically for
|
Agreed branch name for this work is BHoM_Admin-#5-Referencing |
@adecler @FraserGreenroyd @IsakNaslundBh @awakeman @pawelbaran please see notes above to action plan as agreed this morning. |
|
Have updated BHoM/BHoM_Engine#1823 to your suggestion here @adecler . Did change the folder to Upgrades without the bin. |
On post-builds But also any of its dependencies - NuGet acquired dlls or similar MUST also be copied over to standard default post-build command: Additional creation of system folders post-build events will be added to BHoM.csproj only
to remind - this is because BHoM.dll is the primary dependency and thus is guaranteed to be built (or will come with installer). Thus no other toolkit should have to worry about creation of folders (only copying into them) |
Thanks @IsakNaslundBh . I have updated Prs on both BHoM_UI and Versioning_Toolkit to reflect that |
@al-fisher this differs slightly from what I had put in place for the automated script:
Remember having some issue with copy at one point, but cant remember exactly what it was and why. Trying to figure out the difference now, but should agree on something before actioning all the changes today! |
Pre-work and workshop actions as listed above in comment #5 (comment) have successfully been completed with all toolkits included in installers updated to reflect the required changes. Post workshop actions still required naturally including further testing of alphas beyond that carried out today. Thanks @FraserGreenroyd @adecler @IsakNaslundBh @pawelbaran @awakeman @kThorsager @MajaLindroth @peterjamesnugent in particular for efforts today 😄 🎉 |
As discussed benefits now to revisiting our approach to references to BHoM .dlls and management of toolkit responsibility for copying files to central user/program data location.
A few related steps to get agreement on, before potentially making changes across all Toolkits.
At point of making changes we should also add new required compliance check in CI for all toolkits (all that are not pre-alpha and are in installers at least)
Suggesting change location for installer and loading BHoM dlls to
C:\ProgramData\BHoM\Assemblies
This is naturally not unique to users, thus simpler to hardcode references to. Big advantage.
One thing to note. You do not need admin rights to write to
ProgramData
. Although other users will potentially need admin rights if using same machine to modify or uninstall BHoM once installed. Think this is fair - with a benefit to making BHoM version not user specificSwitch to referencing BHoM .dlls in Toolkits directly from the centralised
ProgramData
location (rather than relative Build folders as we are doing now)Benefit here is huge as discussed - as user/developer can keep code references up to date via installers. Do not need to clone all dependencies and build just to work on derivative toolkit.
Devolve responsibility for copying files to
ProgramData
back to individual toolkits and repos.i.e. BHoM_UI will no longer have a PostBuild.exe, blanket mining all conforming folders.
This is now possible to maintain easily, by including clear required CI check in all PRs.
One thing to consider carefully is the copying of
Datasets
across. These will logically sit inC:\ProgramData\BHoM\Datasets
. We previously moved responsibility for this action to BHoM_UI (for good reason) Need to revisit.Is it still BHoM_UI, or likely return to the Core BHoM_Dataset being responsible.
Similarly - worth taking this oppertunity to confirm best location for
BHoMUpgrader
s.Opportunity to promote to clear top level folder, such that we have:
@FraserGreenroyd @adecler @IsakNaslundBh @rwemay
Some points still to discuss above there and get good agreement on approach. Thanks
The text was updated successfully, but these errors were encountered: