-
Couldn't load subscription status.
- Fork 160
Add integration with extendable #r from F# 5.0 #578
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
11 changes: 11 additions & 0 deletions
11
test/FsAutoComplete.DependencyManager.Dummy/FsAutoComplete.DependencyManager.Dummy.fsproj
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>netstandard2.0</TargetFramework> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Compile Include="Library.fs" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| module FsAutoComplete.DependencyManager.Dummy | ||
|
|
||
| open System | ||
|
|
||
| /// A marker attribute to tell FCS that this assembly contains a Dependency Manager, or | ||
| /// that a class with the attribute is a DependencyManager | ||
| [<AttributeUsage(AttributeTargets.Assembly ||| AttributeTargets.Class , AllowMultiple = false)>] | ||
| type DependencyManagerAttribute() = | ||
| inherit Attribute() | ||
|
|
||
| [<assembly: DependencyManager()>] | ||
| do () | ||
|
|
||
| /// returned structure from the ResolveDependencies method call. | ||
| type ResolveDependenciesResult (success: bool, stdOut: string array, stdError: string array, resolutions: string seq, sourceFiles: string seq, roots: string seq) = | ||
|
|
||
| /// Succeded? | ||
| member __.Success = success | ||
|
|
||
| /// The resolution output log | ||
| member __.StdOut = stdOut | ||
|
|
||
| /// The resolution error log (* process stderror *) | ||
| member __.StdError = stdError | ||
|
|
||
| /// The resolution paths (will be treated as #r options) | ||
| member __.Resolutions = resolutions | ||
|
|
||
| /// The source code file paths (will be treated as #load options) | ||
| member __.SourceFiles = sourceFiles | ||
|
|
||
| /// The roots to package directories (will be treated like #I options) | ||
| member __.Roots = roots | ||
|
|
||
| type ScriptExtension = string | ||
| type HashRLines = string seq | ||
| type TFM = string | ||
|
|
||
| [<DependencyManager>] | ||
| /// the type _must_ take an optional output directory | ||
| type DummyDependencyManager(outputDir: string option) = | ||
|
|
||
| /// Name of the dependency manager | ||
| member val Name = "Dummy Dependency Manager" with get | ||
|
|
||
| /// Key that identifies the types of dependencies that this DependencyManager operates on | ||
| member val Key = "dummy" with get | ||
|
|
||
| /// Resolve the dependencies, for the given set of arguments, go find the .dll references, scripts and additional include values. | ||
| member _.ResolveDependencies(_scriptExt: ScriptExtension, _includeLines: HashRLines, _tfm: TFM): obj = | ||
| // generally, here we'd parse the includeLines to determine what to do, | ||
| // package those results into a `ResolveDepndenciesResult`, | ||
| // and return it boxed as obj. | ||
| // but here we will return a dummy | ||
| ResolveDependenciesResult(true, [|"Skipped processing of any hash-r references"|], [||], Seq.empty, Seq.empty, Seq.empty) :> _ |
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
3 changes: 3 additions & 0 deletions
3
test/FsAutoComplete.Tests.Lsp/TestCases/DependencyManagement/Script.fsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #r "dummy: some stuff" | ||
|
|
||
| let number = 10 |
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
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.
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.
Do we want to go ahead and tackle this now?