-
Notifications
You must be signed in to change notification settings - Fork 15
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
refactor: noports core #507
Conversation
… re-expose under libraries
Running the e2e tests against 55a5ad2 Which uses the already published noports_core 4.0.0-dev.2 ~ the end2end tests aren't equipped to handle building and using noports_core from local yet. |
…run in a dart container
6407b66 - I was being over strict with SDK constraints, it doesn't need to be enforced there, I just did it because we had no reason not to... until now... |
@@ -102,7 +102,7 @@ class _ProfileFormState extends ConsumerState<ProfileForm> { | |||
crossAxisAlignment: CrossAxisAlignment.start, | |||
children: [ | |||
CustomTextFormField( | |||
initialValue: oldConfig.sshnpdAtSign ?? '', | |||
initialValue: oldConfig.sshnpdAtSign, |
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.
these were changed from String? to String
legacy_sub='s/legacy/--no-legacy-daemon/g' | ||
fi | ||
eval "$prefix" "$legacy_sub" ../sshnp/entrypoint.sh |
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.
Here is where we insert the --legacy-daemon flag into the command.
@@ -1,6 +1,6 @@ | |||
#!/bin/bash | |||
echo "SSHNP START ENTRY" | |||
SSHNP_COMMAND="$HOME/.local/bin/sshnp -f @sshnpatsign -t @sshnpdatsign -d deviceName -h @sshrvdatsign -s id_ed25519.pub -v > sshnp.log" | |||
SSHNP_COMMAND="$HOME/.local/bin/sshnp -f @sshnpatsign -t @sshnpdatsign -d deviceName -h @sshrvdatsign -s id_ed25519.pub -v legacy > sshnp.log" |
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.
legacy
is the placeholder where the --legacy-daemon
flag might be inserted
dart compile exe ${REPO_DIR}/packages/sshnoports/bin/sshrvd.dart -o ${OUTPUT_DIR}/sshrvd ; \ | ||
dart compile exe ${REPO_DIR}/packages/sshnoports/bin/activate_cli.dart -o ${OUTPUT_DIR}/at_activate ; | ||
dart pub get; \ | ||
dart run melos bootstrap --scope="noports_core" --scope="sshnoports"; \ |
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 step is responsible for doing local linking of sshnoports and noports_core
dart compile exe ${REPO_DIR}/packages/sshnoports/bin/activate_cli.dart -o ${OUTPUT_DIR}/at_activate ; | ||
dart pub get; \ | ||
dart run melos bootstrap --scope="noports_core" --scope="sshnoports"; \ | ||
dart pub get -C ${PACKAGE_DIR}; \ |
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.
Then once linked, doing pub get will cause sshnoports to pull from noports_core locally
dart compile exe ${REPO_DIR}/packages/sshnoports/bin/activate_cli.dart -o ${OUTPUT_DIR}/at_activate ; | ||
cd ${REPO_DIR}; \ | ||
dart pub get; \ | ||
dart run melos bootstrap --scope="noports_core" --scope="sshnoports"; \ |
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.
Same as above
} | ||
|
||
mv "$SRC_DIR/pubspec_overrides.yaml" "$SRC_DIR/pubspec_overrides.back.yaml" | ||
eval "$DART pub get -C $SRC_DIR" || restore_backup_and_exit 1 |
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 prevents accidentally packaging for apple-silicon using the local noports_core instead of the published one if you've run melos bootstrap on your system.
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.
@XavierChanth Thanks for this! There's a lot happening here... it all looks good to me but I note that the e2e tests did not run (for the most recent push at least) ... what's the plan for testing?
Tests should run now, there was a merge conflict in the pubspec.lock Now that we have some code isolation we can start unit testing, I have a second PR coming soon which will enable mobile app support and might make some changes to the work I've done here |
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.
e2e tests failing
trunk tests will fail until this is merged, because trunk doesn't know how to build noports_core (but noports_core is already merged) |
Oh I see - ok |
- What I did
CI:
--legacy-daemon
in the end2end test suiteDocker
noports_core
when necessarynoports_core:
lib/
intolib/src/
so that the code is protected.DefaultArgs
and all SSHNP only ones inDefaultSSHNPArgs
--help
to print usage- How I did it
- How to verify it
N.B. the trunk tests are expected to fail because the branch doesn't have the updated code to build sshnoports with the local noports_core dependency yet (this PR will fix that)
- Description for the changelog
refactor: noports core