-
Notifications
You must be signed in to change notification settings - Fork 4
Revert visionOS changes and provide Copilot instruction improvements #289
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
base: main
Are you sure you want to change the base?
Conversation
|
I found some documentation on bootstrapping the Rust compiler: https://rustc-dev-guide.rust-lang.org/building/bootstrapping/what-bootstrapping-does.html and https://github.com/rust-lang/rust/blob/master/src%2Fbootstrap%2FREADME.md |
|
I also found the docs for the visionos triplets https://doc.rust-lang.org/rustc/platform-support/apple-visionos.html |
Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
…onOS workflow Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
.github/workflows/check-visionos.yml
Outdated
| env: | ||
| CMAKE_RN_TRIPLETS: aarch64-apple-visionos,aarch64-apple-visionos-sim | ||
| FERRIC_TARGETS: aarch64-apple-visionos,aarch64-apple-visionos-sim | ||
| - run: npm run lint |
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.
No need to lint here. It's not in scope of what we want this workflow to do.
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.
Removed the lint step from the visionOS workflow. Commit 8f8d49d
.github/workflows/check-visionos.yml
Outdated
| with: | ||
| node-version: lts/iron | ||
| # Install visionOS targets for Rust | ||
| - run: rustup target add aarch64-apple-visionos aarch64-apple-visionos-sim |
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 won't work. These targets are tier 3 and won't be available prebuilt, so you need to build / bootstrap the Rust compiler as I mentioned in the instructions.
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.
Updated to bootstrap the Rust compiler from source instead of using rustup target add. The workflow now clones rust-lang/rust, configures build for visionOS targets, and uses ./x.py build and install commands. Commit 8f8d49d
|
@copilot please address my comments above |
Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
Addressed both comments: removed lint step and replaced rustup with proper Rust compiler bootstrapping for tier 3 visionOS targets. Commit 8f8d49d Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot I've added the doc.rust-lang.org domain to the firewall allowlist. Please revisit your plan and your changes so far. |
… of full compiler bootstrap Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
Revised the workflow after accessing the visionOS documentation. Changed from full Rust compiler bootstrapping to the recommended -Zbuild-std approach with nightly Rust, which is more efficient and follows the official platform support guide. Commit 598835e Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot I updated the firewall allowlist. Try again. |
…based on official Rust documentation Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
Enhanced the visionOS workflow with comprehensive build-std configuration after accessing the full Rust documentation. Key improvements: proper nightly Rust + rust-src setup, comprehensive .cargo/config.toml following official docs, enhanced verification steps, and better debugging output. Commit 7da043c |
|
@copilot okay - it seems the build succeeded, but the linking failed. This is expected to me, since Ferric is responsible for passing the options to the linker to prevent this failure. I need you to update the Ferric codebase to perform a different pre-condition check for the Rust targets that cannot be downloaded, with a link to instructions (I imagine Rust has a docs page we can link to) on how to setup the "-Zbuild-std" preparation you've done in the action. |
Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
Updated the Ferric codebase to handle tier 3 targets properly. Added |
|
@copilot I've added a few comments to the code. |
Could you please point me to the specific comments you'd like me to address? I don't see any new inline review comments in the current view. If you've added review comments to specific lines or files, please let me know which ones need attention and I'll address them accordingly. |
packages/ferric/src/targets.ts
Outdated
| } | ||
|
|
||
| // Handle tier 3 targets that require build-std setup | ||
| if (tier3Targets.size > 0) { |
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.
@copilot I think this would be a good use of assertFixable and it seems this will unconditionally fail if any tier target is used. I believe we need a change in getInstalledTargets to include these tier 3 targets in the return value.
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.
Implemented both suggestions: replaced throw new UsageError with assertFixable for better CLI integration, and enhanced getInstalledTargets() to intelligently include tier 3 targets when build-std prerequisites are met (nightly Rust + rust-src component). This eliminates unconditional failures and provides seamless workflow when properly configured. Commit abcbd29
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.
@copilot it seems like a bit of a stretch to me to add all tier 3 targets needed if just the nightly compiler is installed and rust-src is available. Is there a cargo command you can use to inspect the .cargo/config.toml to check for the targets to be declared? Or perhaps that's not a requirement? If no rust command exists, perhaps a toml parser from NPM is needed?
Alternatively, that check might need to happen in ensureInstalledTargets, which might also need to be renamed, since we're technically not getting the "installed targets" anymore?
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.
You're absolutely right about it being too broad. I refactored the approach: reverted getInstalledTargets() to its original simple purpose (only rustup-installed targets), moved the tier 3 logic to ensureInstalledTargets() where it belongs, and made the validation much more precise - it only checks build-std prerequisites when tier 3 targets are actually requested. This eliminates the overly broad assumption and provides cleaner separation of concerns. Commit c14d33a
…ledTargets Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
…ts and simplify getInstalledTargets Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
|
@copilot please have a look at #294 and the changes within. This other PR superseeds your work here. I want you to revert all of the changes you've made so far and instead suggest changes to the instructions file to help you produce something more like the changes I propose in the other PR, in the future. |
Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
…ructions Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
Reverted all changes. Created |
|
@copilot you need to add this to the existing copilot_instrucrions.md and I want you to be much more brief, while focusing only on the differences which are really significant and instructions which would have helped you produce a better result, in the context of the steps you took yourself as well. Also - I want no general wording like " follow best practice" etc. I want you to focus on the concrete practice you can derive from the other PR. |
Co-authored-by: kraenhansen <1243959+kraenhansen@users.noreply.github.com>
Added focused improvements to existing |
Revert Complete + Focused Instruction Improvements
All changes have been reverted as this work was superseded by PR #294.
Changes in this commit:
COPILOT_INSTRUCTIONS_IMPROVEMENTS.mdfile.github/copilot-instructions.mdKey concrete improvements based on PR #294 differences:
Set<TargetName>with built-in methods, rename functions when responsibilities changeOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.