Skip to content

FacilityLanguageServer Package - #29

Open
jeff-huff wants to merge 3 commits into
FacilityApi:masterfrom
jeff-huff:jeff-huff/enable-dotnet-tool
Open

FacilityLanguageServer Package#29
jeff-huff wants to merge 3 commits into
FacilityApi:masterfrom
jeff-huff:jeff-huff/enable-dotnet-tool

Conversation

@jeff-huff

@jeff-huff jeff-huff commented Jun 25, 2026

Copy link
Copy Markdown
  • Package Facility.LanguageServer as a NuGet package for use with dnx in Agent LSP configurations.
{
  "lspServers": {
    "facility": {
      "command": "dnx",
      "args": [
        "--yes",
        "--prerelease",
        "Facility.LanguageServer",
      ],
      "fileExtensions": {
        ".fsd": "facility",
      }
    }
  }
}

NOTE:

  • Needs help with the FaithlifePrivateBuild package actions and probably the ci.yaml. Not sure what doing both the NuGet package and the release file should look like.
  • Does it need to package an win-x64 file?
  • Will need the Project Secrets configured to publish the package.

@jeff-huff
jeff-huff force-pushed the jeff-huff/enable-dotnet-tool branch from 20c34aa to e0197c1 Compare June 25, 2026 22:00
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
@jeff-huff
jeff-huff force-pushed the jeff-huff/enable-dotnet-tool branch from e0197c1 to 9525629 Compare June 25, 2026 22:23
@jeff-huff
jeff-huff marked this pull request as ready for review June 25, 2026 22:25
@jeff-huff
jeff-huff force-pushed the jeff-huff/enable-dotnet-tool branch from 9525629 to 24dcc98 Compare June 25, 2026 22:39
Comment thread src/Facility.LanguageServer/Facility.LanguageServer.csproj
@jeff-huff
jeff-huff force-pushed the jeff-huff/enable-dotnet-tool branch from 24dcc98 to a00df8c Compare June 25, 2026 22:48

@ddunkin ddunkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packing is failing in CI because of the win-x64 runtime. Maybe we don't need that. I think I was trying to not require a dotnet runtime to be installed on Windows, but that seems like a reasonable requirement.

Comment thread .github/workflows/ci.yml
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} release/*.zip No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed?

@jeff-huff jeff-huff Jun 30, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still want to create GitHub releases that show up in the repo Releases section? Not sure how that is actually triggered.

What should the relationship between publishing a package and creating a release be? Do we want a package and release on every successful build, or a package on every build and manual release, or both only when a manual release is created?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The currently favored convention is a release whenever the version changes. Changing the version should tag the repo, create a release with the zip, and publish nuget packages.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe the release process? The previous release did not have a tag on the commit.

9de7f6d

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The process is currently to push a tag to release.

To publish, use GitHub to [publish a new release](https://github.com/FacilityApi/FacilityLanguageServer/releases) using a new tag called `v1.2.3`, where `1.2.3` matches the version in [Directory.Build.props](https://github.com/FacilityApi/FacilityLanguageServer/blob/master/Directory.Build.props).

The 2.5.2 and 2.5.3 versions were never actually published because no tags were pushed. Other Facility repos use an automatic publish whenever the version changes, e.g. FacilityCSharp.

Because this PR's change would now publish nuget packages, it would be preferable to publish them the same way as the other Facility repos, automatically when the version changes. The VS Code extension includes the language server, which it downloads as a zip from the release at build time. It would be simplest to keep that mechanism rather than add a dependency on a dotnet tool.

cc @ejball

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a gh release create <tag> <file> after the publish step but we would need to know the new release tag. If we have gh release run on pushes of tags it would need to build again since artifacts are only available in the same workflow run.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For nuget packages, we run publish every time and take advantage of skip duplicates. The rest of the build would have to be smarter about knowing when the new version was actually pushed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, how about a new workflow that runs on tags and creates the release.

release.yml

@jeff-huff
jeff-huff force-pushed the jeff-huff/enable-dotnet-tool branch from a00df8c to 5500e50 Compare June 29, 2026 16:10
@jeff-huff

Copy link
Copy Markdown
Author

I added a guard for windows-latest to the package and upload steps. Not sure why it would fail with those.

@ddunkin ddunkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just remove the Windows-specific build altogether.

Comment thread tools/Build/Build.cs
Directory.CreateDirectory(releasePath);
Publish(frameworkPublishPath);
Publish(windowsPublishPath, "--runtime", "win-x64", "-p:PublishSingleFile=true", "--self-contained", "false");
Zip(frameworkPublishPath, Path.Combine(releasePath, "Facility.LanguageServer.zip"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do want to keep this zip because this is what the VS Code plugin uses.

@jeff-huff
jeff-huff force-pushed the jeff-huff/enable-dotnet-tool branch from b1c0334 to f18bf24 Compare June 30, 2026 02:25
@ddunkin

ddunkin commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The Visual Studio extension uses the Windows build. I would think that could be modified to use dotnet instead, but I'm not 100% sure.
https://github.com/FacilityApi/FacilityVisualStudio/blame/a5cd6f81f63927b88547c514605251dc8fc8b80c/README.md#L8

@jeff-huff
jeff-huff force-pushed the jeff-huff/enable-dotnet-tool branch from f18bf24 to 3a9a391 Compare July 2, 2026 21:31
@ejball

ejball commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Is this still in progress?

@ddunkin

ddunkin commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Is this still in progress?

I don't really have time to work on it. The tag checking hack is gross. Ideally there would be a clean way to know if a tag was created and create the release then. Or maybe we could always try to create the release and ignore failure?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants