-
Notifications
You must be signed in to change notification settings - Fork 19
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
Drop database #510
Drop database #510
Conversation
@@ -235,7 +235,7 @@ | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
shellPath = /bin/sh; | |||
shellScript = "cp -r ${BUILD_DIR}/Products/GoSSB.xcframework/ ${PROJECT_DIR}/../Frameworks/GoSSB.xcframework\n\n"; | |||
shellScript = "rsync -t ${BUILD_DIR}/Products/GoSSB.xcframework/ ${PROJECT_DIR}/../Frameworks/GoSSB.xcframework\n\n"; |
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.
I learned recently that you shouldn't use cp
in a build phase because it changes the file's last modified time and can cause unnecessary rebuilds. rsync -t
preserves the last modified time.
@@ -8,25 +8,6 @@ | |||
|
|||
import Foundation | |||
|
|||
extension AppConfiguration { |
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.
I moved this out of an extension so I could mock it in the unit tests.
AppController.shared.showMainViewController(animated: true) | ||
appController.showMainViewController(animated: true) | ||
} | ||
|
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.
The diff for this file got messy. The next two functions: handleLoginFailure
and trackLogin
don't have a lot of changes, I just factored them out of launch
.
@@ -247,10 +247,6 @@ private class MenuView: UIView { | |||
let maxHeightConstraint = connectedPeersView.heightAnchor.constraint(equalToConstant: 310) | |||
maxHeightConstraint.priority = UILayoutPriority(501) | |||
maxHeightConstraint.isActive = true | |||
|
|||
if Date.todayIsAHoliday() { |
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.
This was a cool Easter egg, but it has the old Planetary branding and only works with US holidays, so this Easter seemed like a good time to retire it.
static let unselectedTab = UIColor(named: "unselectedTab")! | ||
static let textInputBorder = UIColor(named: "textInputBorder")! | ||
static let textInputBackground = UIColor(named: "textInputBackground")! | ||
static let appBackground = UIColor(named: "appBackground", in: Bundle.current, compatibleWith: nil) ?? UIColor.white |
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.
This gets these working in the test target. In the future I would like to generate this file from an .xcassets directory with SwiftGen so I didn't worry about finding a cleaner solution.
I tried to run this on a simulator that had an active db, it worked on building, threw up the loading screen, but is not migrating. level=warn ts="2022-04-21 01:27:07.2899950 (UTC)" RepoStats="RepoStats: could not get the last message hash: error read offset of seq(-1): seek failed:seek /Users/rabble/Library/Developer/CoreSimulator/Devices/541B498A-08E5-4764-A65F-3ABAB8622449/data/Containers/Data/Application/EACEF622-7A6F-4191-A028-AD3CA2F9AF69/Library/Application Support/FBTT/d4a1cb88a66f02f8db635ce26441cc5dac1b08420ceaac230839b755845a9ffb/GoSbot/log/ofst: invalid argument" |
@rabble thanks for catching this! I tested on the test network and it worked, but when I tested on the main SSB net it failed for me too. The culprit was a bad regex I had written to parse multiserver addresses. It's fixed now! |
The unit tests pass for me locally but are failing on CI. I'll take a look this afternoon. |
* remove xcpretty * bring xcpretty back * turn on sync logging * add beautify * introduce error * bring xcpretty back * remove introduced error * mock Logger in Support * fix Codacy issues
* Update CONTRIBUTING.md * add CONTRIBUTING.md to Planetary project * add cocoapods to Gemfile * update CONTRIBUTNG.md * remove unnecesary step * Update CONTRIBUTING.md * Update CONTRIBUTING.md * add swiftlint_diff back to the project * add missing files back to xcodeproj
Warning: if you run this branch it will drop your database!
This is a big chunk of #421, which adds migration logic to delete the user's database and resync it from the network so that the latest version of go-ssb can start a fresh db.
What's done:
LaunchViewController
in the tests)What's left for future PRs:
Sorry for the large PR. Each part kind of needed the others so it ended up being large. But don't let the 2000+ lines added stat scare you too much. A lot of the changed lines were caused by adding files and Pods to the test target.