-
Notifications
You must be signed in to change notification settings - Fork 6k
Document relative path limitation and add cross-platform examples for F# Interactive #i directive #49118
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
Conversation
Co-authored-by: BillWagner <[email protected]>
Co-authored-by: BillWagner <[email protected]>
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 is read for final review.
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.
Pull Request Overview
This PR addresses a documentation gap in the F# Interactive reference regarding the #i
directive for specifying package sources. The main purpose is to clarify that relative paths are not supported and to provide comprehensive cross-platform examples for absolute paths.
Key changes:
- Added explicit statement that relative paths aren't supported with the
#i
directive - Included cross-platform absolute path examples for macOS and Linux
- Added workaround guidance using
__SOURCE_DIRECTORY__
andSystem.IO.Path.Combine()
Co-authored-by: Copilot <[email protected]>
Summary
This PR addresses a documentation gap in the F# Interactive reference regarding the
#i
directive for specifying package sources. The documentation now clearly states that relative paths are not supported and provides comprehensive cross-platform examples.Problem
Users were unclear whether relative paths work with the
#i
directive when specifying local package sources in F# Interactive. The documentation only showed a Windows absolute path example, leaving macOS and Linux users without guidance. For example, a user attempting to use:#i "./my/local/packages"
would encounter an error with no explanation in the documentation about why this doesn't work or what the alternative is.
Changes
Added cross-platform absolute path examples
/Users/username/path/to/my/local/source
/home/username/path/to/my/local/source
Added IMPORTANT callout clarifying that:
#i
directive__SOURCE_DIRECTORY__
combined withSystem.IO.Path.Combine()
Improved documentation quality
ai-usage: ai-assisted
frontmatter metadatams.date
to reflect current changesTesting
Validated the behavior by testing F# Interactive:
Impact
This change directly answers the user's question and prevents confusion for developers trying to use local package sources in F# Interactive scripts on macOS and Linux. The documentation now provides clear guidance on what works, what doesn't, and why.
Original prompt
Fixes #28973
💡 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.
Internal previews