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

Upgrade pkg SmartFormat to v3.0.0 #9912

Merged
merged 2 commits into from Mar 24, 2022

Conversation

axunonb
Copy link
Contributor

@axunonb axunonb commented Mar 23, 2022

Refers to #9909 (comment)

Proposed changes

  • Upgrade package SmartFormat to v3.0.0, using the Core instead of the Full package, getting rid of unnecessary dependencies
  • Brings higher performance in speed and memory footprint (more details)
  • Fix: To achieve the same error behavior as in pre v2.5.0, formatter exceptions and parser exceptions must be set to "ignore". The latter was missing when migrating to v2.5.0

Test methodology

  • Existing unit tests succeed with the updated package
  • Manual, testing for English, French and German translations display okay (random samples)

Test environment(s)

  • GIT 2.33.0.windows.2
  • Windows 11 Pro

Merge strategy

  • I agree that the maintainer squash merge this PR

✒️ I contribute this code under The Developer Certificate of Origin.

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

Thank you.
Works for my dev build.
I have not checked whether the installer is affected.

@RussKie
Copy link
Member

RussKie commented Mar 23, 2022

@axunonb
Copy link
Contributor Author

axunonb commented Mar 24, 2022

You can test the installer: https://ci.appveyor.com/project/gitextensions/gitextensions/builds/42996818/artifacts

The installer is working, too.

@mstv mstv merged commit d1f6920 into gitextensions:master Mar 24, 2022
@ghost ghost added this to the vNext milestone Mar 24, 2022
@RussKie
Copy link
Member

RussKie commented Mar 24, 2022 via email

@axunonb axunonb deleted the pr-upgrade-smartformat-to-v300 branch March 24, 2022 21:42
@RussKie
Copy link
Member

RussKie commented Mar 28, 2022

@axunonb have you installed the update?
I'm getting this error using the latest build:

  • Git Extensions 4.0.0.13624
  • Build 9d7b5b6e9e02977599f29f35ffcfeb810c0eb62d (Dirty)
  • Git 2.35.1.windows.2
  • Microsoft Windows NT 10.0.22000.0
  • .NET 6.0.3
  • DPI 96dpi (no scaling)
System.IO.FileNotFoundException: Could not load file or assembly 'SmartFormat.ZString, Version=3.0.0.0, Culture=neutral, PublicKeyToken=568866805651201f'. The system cannot find the file specified.
   at SmartFormat.Core.Output.ZStringOutput..ctor(Int32 capacity)
   at SmartFormat.SmartFormatter.Format(IFormatProvider provider, String format, IList`1 args)
   at SmartFormat.SmartFormatter.Format(IFormatProvider provider, String format, Object[] args)
   at SmartFormat.Smart.Format(IFormatProvider provider, String format, Object[] args)
   at ResourceManager.TranslatedStrings.GetAuthor(Int32 value)
   at ResourceManager.TranslatedStrings.get_Author()
   at ResourceManager.CommitDataRenders.TabbedHeaderRenderStyleProvider..ctor()
   at GitUI.CommitInfo.CommitInfoHeader..ctor()
   at GitUI.CommitInfo.CommitInfo.InitializeComponent()
   at GitUI.CommitInfo.CommitInfo..ctor()
   at GitUI.CommandsDialogs.FormBrowse.InitializeComponent()
   at GitUI.CommandsDialogs.FormBrowse..ctor(GitUICommands commands, BrowseArguments args)
   at GitUI.GitUICommands.StartBrowseDialog(IWin32Window owner, BrowseArguments args)
   at GitExtensions.Program.RunApplication()
   at GitExtensions.Program.Main()

@axunonb
Copy link
Contributor Author

axunonb commented Mar 28, 2022

@RussKie - Now I installed on a clean VM and I can reproduce the issue.
SmartFormat.DLL requires SmartFormat.ZString, which is included with the same NuGet package, but it does not get installed with the installer. As soon as you copy the missing DLL from the portable package, it works.

I used the installer link given in #9912 (comment)
Which is obviously not the one I should have used - my fault, sorry.

@mstv
Copy link
Member

mstv commented Mar 28, 2022

SmartFormat.ZString is missing in the installer. (But it is contained in the portable version.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants