Skip to content
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

allow users to inject their own jsonRpc customizations #40

Merged
merged 1 commit into from Sep 21, 2022

Conversation

baronfel
Copy link
Contributor

A different take on #35 because to be honest I'm not sure what the actual issue is.

Current clients should be able to use the defaultRpc function that's provided for the new parameter to startWithSetup, and the existing behavior should be preserved. Clients with more custom needs should be able to override this entirely to their own needs.

@razzmatazz If this was merged + released, could you test a change to FSAC itself along the lines of #35 and see if that fixes emacs? I'm toying with #39 as a longer-term fix/refactor of this library, but that's a much larger set of changes and is nowhere near complete or stable.

@baronfel
Copy link
Contributor Author

Going to merge and release this so that we can get FSAC staged with changes.

@baronfel baronfel merged commit 70fc793 into ionide:main Sep 21, 2022
@baronfel baronfel deleted the allow-rpc-configuration branch September 21, 2022 16:05
@razzmatazz
Copy link
Contributor

razzmatazz commented Sep 21, 2022

@baronfel there is no branch on fsac to test/build this yet, correct?

building fsac on mac still fails due to the same fake issue for me:

$ dotnet fake build
Consider adding your dependencies via `#r` dependencies, for example add '#r "paket: nuget FSharp.Core //"'.
See https://fake.build/fake-fake5-modules.html for details. 
If you know what you are doing you can silence this warning by setting the environment variable 'FAKE_ALLOW_NO_DEPENDENCIES' to 'true'
Updating group Main in /Users/bob/src/FsAutoComplete/.fake/demo.fsx/paket.dependencies
Resolving dependency graph...
Starting full restore process.
Starting task 'DotNet:version': running dotnet --version
6.0.401
Finished (Success) 'DotNet:version' in 00:00:00.1311565
Script is not valid:
	unknown (1,0)-(1,0): Error FS0193: The specified file name or path is too long, or a component of the specified path is too long.
Performance:
 - Cli parsing: 90 milliseconds
 - Packages: 960 milliseconds
   - Resolver: 823 milliseconds (1 runs)
      - Runtime: 29 milliseconds
      - Blocked (retrieving package details): 45 milliseconds (1 times)
      - Blocked (retrieving package versions): 748 milliseconds (1 times)
   - Disk IO: 11 milliseconds
   - Average Request Time: 308 milliseconds
   - Number of Requests: 2
   - Creating Runtime Graph: 1 millisecond
   - Retrieve Assembly List: 7 seconds
 - Script compiling: 260 milliseconds
 - Script analyzing: 71 milliseconds
 - Runtime: 8 seconds

@baronfel
Copy link
Contributor Author

correct - I haven't made a release with this and included it in FSAC yet.

@baronfel
Copy link
Contributor Author

Make sure you're up to date - I did move from build.fsx to a build project. dotnet run --project build is the incantation.

@razzmatazz
Copy link
Contributor

razzmatazz commented Sep 21, 2022

Make sure you're up to date - I did move from build.fsx to a build project. dotnet run --project build is the incantation.

mhm, note that README.md is outdated then:

Bildschirmfoto 2022-09-21 um 21 10 04

hmm.. actually, I think it worked mostly–so README.md needs to be updated

the build however emits some garbage about "missing `Default' target" at the end -- but I guess this is not a problem :)

/usr/local/share/dotnet/sdk/6.0.401/MSBuild.dll -consoleloggerparameters:Summary -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/local/share/dotnet/sdk/6.0.401/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/local/share/dotnet/sdk/6.0.401/dotnet.dll -maxcpucount -property:Configuration=Release -restore -verbosity:m /bl:/var/folders/87/y2ntmsp50gsg9gxq785rnznm0000gn/T/tmpYJpBiF.tmp.binlog FsAutoComplete.sln
  Determining projects to restore...
  All projects are up-to-date for restore.
  FsAutoComplete.DependencyManager.Dummy -> /Users/bob/src/FsAutoComplete/test/FsAutoComplete.DependencyManager.Dummy/bin/Release/netstandard2.0/FsAutoComplete.DependencyManager.Dummy.dll
  FsAutoComplete.Logging -> /Users/bob/src/FsAutoComplete/src/FsAutoComplete.Logging/bin/Release/netstandard2.0/FsAutoComplete.Logging.dll
  build -> /Users/bob/src/FsAutoComplete/build/bin/Release/net6.0/build.dll
  OptionAnalyzer -> /Users/bob/src/FsAutoComplete/test/OptionAnalyzer/bin/Release/net6.0/OptionAnalyzer.dll
  FsAutoComplete.Core -> /Users/bob/src/FsAutoComplete/src/FsAutoComplete.Core/bin/Release/net6.0/FsAutoComplete.Core.dll
  FsAutoComplete -> /Users/bob/src/FsAutoComplete/src/FsAutoComplete/bin/Release/net6.0/fsautocomplete.dll
  FsAutoComplete.Tests.Lsp -> /Users/bob/src/FsAutoComplete/test/FsAutoComplete.Tests.Lsp/bin/Release/net6.0/FsAutoComplete.Tests.Lsp.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:19.06
Finished (Success) 'DotNet:build' in 00:00:19.2827335
Finished (Success) 'Build' in 00:00:19.2831632

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target                      Duration
------                      --------
CheckFormat                 00:00:01.8567191
Restore                     00:00:16.2993742
ReplaceFsLibLogNamespaces   00:00:00.0054112
Build                       00:00:19.2831534
Total:                      00:00:37.4850420
Status:                     Ok
---------------------------------------------------------------------
run Default
Building project with version: LocalBuild
The following targets are available:
   All
   Build
   CheckFormat
   Clean
   Coverage
   CreateVersionTag
   EnsureRepoConfig
   Format
   LocalRelease
   LspTest
   NoOp
   Promote
   PromoteUnreleasedToVersion
   Release
   ReleaseArchive
   ReplaceFsLibLogNamespaces
   Restore
   Test
Target "Default" is not defined. Existing targets:
  - LspTest
  - Coverage
  - ReleaseArchive
  - LocalRelease
  - Clean
  - Restore
  - Build
  - ReplaceFsLibLogNamespaces
  - Format
  - CheckFormat
  - EnsureRepoConfig
  - NoOp
  - Test
  - All
  - Release
  - PromoteUnreleasedToVersion
  - CreateVersionTag
  - Promote
System.Exception: Target "Default" is not defined.
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1439.Invoke(String message)
   at Fake.Core.TargetModule.visitDependenciesAux@637-1(HashSet`1 visited, List`1 visitedTargets, FSharpList`1 _arg1)
   at Fake.Core.TargetModule.determineBuildOrder(String target)
   at Fake.Core.TargetModule.runInternal(Boolean singleTarget, Int32 parallelJobs, String targetName, FSharpList`1 args)
   at Fake.Core.TargetModule.getRunFunction@1112-1.Invoke(Unit unitVar0)
   at Fake.Core.TargetModule.runFunction(FSharpOption`1 targetFunction)
   at Fake.Core.TargetModule.runOrDefaultWithArguments(String defaultTarget)
   at Program.main(String[] args) in /Users/bob/src/FsAutoComplete/build/Program.fs:line 235

@baronfel
Copy link
Contributor Author

good call - thanks. I'll try to address both of those when I push and update this library in FSAC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants