-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
227a8e7
commit a1a37a4
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a1a37a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presenting Signum.Upgrade
The pain of upgrading
Signum Framework is more than 11 years old, but we have always been proud of keeping it up to date with technology.
We have always tried to make the upgrade process as simple as possible by keeping
Southwind
as a reference application to manually copy the changes, and by posting entries like this in the change log with upgrading instructions.Still, upgrading the framework is the nightmare of many Signum Framework developers. A Signum Framework update typically also means upgrades in NuGet packages, NPM packages, or even Typescript, C# or .Net Core version. All technical updates that take time, can produce bugs, and are hard to justify to non-technical stakeholders.
Being scared of this changes only makes the problem worst: By delaying the upgrades they accumulate like a growing snow ball.
This problem is not particular to Signum Framework applications, most applications just never upgrade...
The solution
Signum.Upgrade is a new console application in Signum.Framework.
This project contains a directory called
Upgrades
with classes inheriting fromCodeUpgradeBase
and responsible of automatically modifying your code. Think of them like migrations but instead of changing your database they change your code.This Upgrades can do any kind of transformation in your code like replacing spans, adding, removing or replacing any arbitrary line, and of course adding/removing or updating NPM or Nuget references.
Controlling your git repo
Signum.Upgrade
also takes the liberty of controlling of your git repository usinglibgit2Sharp
. Specifically, it prevents from running Upgrades if you have not committed all your code (except submodule changes), and after running each Upgrade allows you to automatically make a commit with its name. This way you can easily revert/retry any upgrade.Warnings
The reliability of this changes depends strongly on how aligned your project is with
Southwind
example application.If some file that needs to be modified has been renamed or deleted (
packages.json
,Startup.cs
,MainPublic.tsx
, ...), or some reference line has been removed, some steps of theUpgrade
could produce warnings.How to use it
Since
Signum.Upgrade
is in themaster
branch, it's already using .Net 5, so you need to:16.8.0
or greater.https://dotnet.microsoft.com/download/dotnet/5.0
Framework
andExtensions
submodules in you git repositoryFramework
virtual folder, Add -> Existing ProjectSignum.Upgrade
.Signum.Upgrade
Signum.Upgrade
will automatically detect the the root directory of your application.The first time it will need to create a
SignumUpgrade.txt
file in your application folder. This file keeps track of the Upgrades that have already been executed, so you need to determine manually which Upgrades should be considered already executed. If you were up to date with changes until today selectUpgrade_20201110_DotNet5
.Conclusion
The changes made by
Signum.Upgrade
could be enough for small upgrades, but often you will need to also manually fix more custom parts of your code. Also is strongly advised to carefully review and understand the changes made.Still, I think Signum.Upgrade will strongly alleviate the process of upgrading Signum Applications, specially if you have more than one.
Enjoy :)
a1a37a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, Excellent!
a1a37a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent,
a1a37a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.