Repository navigation
feat(user): check the installation before migrating user data - #186
Open
ehennestad wants to merge 8 commits into
Open
ehennestad wants to merge 8 commits into
ehennestad wants to merge 8 commits into
Conversation
findInstallationProblems reports the folders of the NANSEN code that are not on the search path and the required community toolboxes that are not on it. A repository updated with git keeps the search path that was saved for the earlier version, so both can be missing after an update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The migration of the _userdata folder deletes that folder, and the project upgrade after it creates each project again, which needs all of NANSEN and its toolboxes. On an incomplete installation every project upgrade failed at every start, after two dialogs and a backup of the project folder. The session now stops before it touches _userdata when the installation is incomplete, and the error says to run nansen_install. upgradeProjects warns and leaves the project folders alone instead of attempting each upgrade. The check only runs when there is something to migrate, so an ordinary start is not affected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
…gration The base branch no longer tracks .github/badges/tests.svg, so the generated badge is removed here as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nansen.setup turned NANSEN:Setup:InstallationIncomplete into a warning and went on without a user session, so it then failed with "No user session is active". The identifier now joins the errors that end the setup with their message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The manifest said limitFigSize, while the file and every caller use LimitFigSize. The installation check refuses a migration when a required install check does not resolve, so the entry has to match the name of the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nansen_install.m is in the repository root, which it does not add to the search path, so the warning has to name the folder. Upgrades run when a user session is created, so MATLAB has to be restarted after the installation. testFailedUpgradeWarnsWithReason now assumes a complete installation, because an incomplete one skips the upgrade that the test exercises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A repository updated with git keeps the MATLAB search path that was saved for the earlier version. After an update from
main, the folderscode/api,code/examples,code/externalandcode/modulesare not on it.devalso requires 18 community toolboxes, whilemainrequires 2 and bundles 8 of the others underexternal/fileexchange, whichdevdoes not track.NansenUserSessionstarts the migration anyway.migrateUserdatamoves and deletes_userdata, andupgradeProjectscreates each project again. That step needs all of NANSEN and its toolboxes, so it fails on the first missing function, at every start, after two dialogs and a backup of each project folder.Change
nansen.internal.setup.findInstallationProblemslists the folders of the NANSEN code that are not on the search path and the required community toolboxes that are not on it. It comparesgenpath(nansen.toolboxdir)with the search path, and uses theinstallCheckof each required entry in the dependency manifest. TheinstallCheckof Limit figure size is corrected toLimitFigSize, the name of the file.NansenUserSessioncalls it beforemigrateUserdataand throwsNANSEN:Setup:InstallationIncompleteif anything is missing._userdatais not touched, and the message says to runnansen_install.nansenandnansen.setupshow the message without a stack trace. The session creates the add-on manager first, because that is what puts the toolboxes it tracks on the search path.upgradeProjectscalls it before its dialogs. If anything is missing it warns withNANSEN:ProjectManager:ProjectUpgradeSkipped, says wherenansen_installis, and leaves the project folders alone.The check only runs when there is something to migrate, so an ordinary start is not affected.
🤖 Generated with Claude Code