Skip to content

Commit 32cd8bb

Browse files
committed
Make packaging code shipshape.
1 parent 7f9b53d commit 32cd8bb

File tree

13 files changed

+114
-27
lines changed

13 files changed

+114
-27
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@
5757
<PackageVersion Include="Fake.DotNet.MsBuild" Version="$(FakeVersion)" />
5858
<PackageVersion Include="Fake.Api.GitHub" Version="$(FakeVersion)" />
5959
</ItemGroup>
60-
</Project>
60+
</Project>

nuget.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
5+
<clear />
6+
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
7+
</packageSources>
8+
</configuration>

src/Directory.Build.props

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project ToolsVersion="15.0">
1+
<Project>
22
<PropertyGroup>
33
<PublishRepositoryUrl>true</PublishRepositoryUrl>
44
<EmbedUntrackedSources>true</EmbedUntrackedSources>
@@ -13,5 +13,15 @@
1313
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1414
<PackageDescription>MSBuild evaluation, fsproj file loading, and project system for F# tooling</PackageDescription>
1515
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
16+
<PackageReadmeFile Condition="Exists('$(MSBuildProjectDirectory)/README.md')">README.md</PackageReadmeFile>
1617
</PropertyGroup>
17-
</Project>
18+
19+
<ItemGroup>
20+
<PackageReference Include="Dotnet.ReproducibleBuilds" ExcludeAssets="runtime" PrivateAssets="all" />
21+
<PackageReference Include="Ionide.KeepAChangelog.Tasks" ExcludeAssets="runtime" PrivateAssets="all" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<None Include="$(MSBuildProjectDirectory)/README.md" Condition="Exists('$(MSBuildProjectDirectory)/README.md')" Pack="true" PackagePath="./README.md" />
26+
</ItemGroup>
27+
</Project>

src/Ionide.ProjInfo.FCS/Ionide.ProjInfo.FCS.fsproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
<ItemGroup>
1313
<ProjectReference Include="..\Ionide.ProjInfo\Ionide.ProjInfo.fsproj" />
1414
</ItemGroup>
15+
1516
<ItemGroup>
16-
<PackageReference Include="Dotnet.ReproducibleBuilds" PrivateAssets="All" />
17-
<PackageReference Include="Ionide.KeepAChangelog.Tasks" PrivateAssets="All" />
1817
<PackageReference Include="FSharp.Core" VersionOverride="$(FSharpCoreCompilerVersion)" />
1918
<PackageReference Include="FSharp.Compiler.Service" />
2019
</ItemGroup>

src/Ionide.ProjInfo.FCS/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ionide.ProjInfo.FCS
2+
3+
This is a helper library that provides APIs to map Ionide.ProjInfo.Types.ProjectOptions instances to FSharp.Compiler.CodeAnalysis.FSharpProjectOptions instances.
4+
5+
Assuming you've already done the steps in Ionide.ProjInfo to get the ProjectOptions instances, you can use the following code to get the FSharpProjectOptions for those instances efficiently
6+
7+
```fsharp
8+
open Ionide.ProjInfo
9+
10+
let fcsProjectOptions = FCS.mapManyOptions projectOptions
11+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Ionide.ProjInfo.ProjectSystem
2+
3+
This library provides helpers for operating an entire project system based on the data structures returned by the Ionide.ProjInfo library.
4+
5+
The main entrypoint is the `ProjectController` API in the Ionide.ProjInfo.ProjectSystem workspace:
6+
7+
```fsharp
8+
type ProjectController(toolsPath: ToolsPath, workspaceLoaderFactory: ToolsPath -> IWorkspaceLoader) =
9+
...
10+
```
11+
12+
From there you can load specific projects, get their dependencies, and more.

src/Ionide.ProjInfo.Sln/Ionide.ProjInfo.Sln.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,4 @@
77
<DefineConstants>FULL_SLN_PARSER;STANDALONEBUILD;$(DefineConstants)</DefineConstants>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
99
</PropertyGroup>
10-
11-
<ItemGroup>
12-
13-
<PackageReference Include="Dotnet.ReproducibleBuilds" PrivateAssets="All" />
14-
<PackageReference Include="Ionide.KeepAChangelog.Tasks" PrivateAssets="All" />
15-
16-
</ItemGroup>
17-
18-
</Project>
10+
</Project>

src/Ionide.ProjInfo.Tool/Ionide.ProjInfo.Tool.fsproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Dotnet.ReproducibleBuilds" PrivateAssets="All" />
23-
<PackageReference Include="Ionide.KeepAChangelog.Tasks" PrivateAssets="All" />
24-
<PackageReference Include="Microsoft.Build" PrivateAssets="All" />
25-
<PackageReference Include="Microsoft.Build.Framework" PrivateAssets="All" />
22+
<PackageReference Include="Microsoft.Build" IncludeAssets="compile" ExcludeAssets="runtime" PrivateAssets="all" />
23+
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="compile" ExcludeAssets="runtime" PrivateAssets="all" />
2624
<PackageReference Include="Argu" />
2725
</ItemGroup>
2826
</Project>

src/Ionide.ProjInfo.Tool/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Ionide.ProjInfo.Tool
2+
3+
A .NET SDK tool that allows for quick parsing of projects and solutions.
4+
5+
Broadly, the tool has three kinds of arguments:
6+
7+
8+
### Loading args
9+
10+
```
11+
--project <PATH> the path to a project file to load
12+
--solution <PATH> the path to a solution file to load
13+
```
14+
15+
### How to load a project
16+
17+
By default you will use the standard MSBuild loader, but specifying `--graph` will use the MSBuild graph loader.
18+
19+
### What to parse the results into
20+
21+
By default you will get a structured text version of the Ionide project options for the project(s). If you want, you can get the FCS ProjectOptions versions by adding the `--fcs` flag. Finally, you can get project JSON with `--serialize` as well.

src/Ionide.ProjInfo/Ionide.ProjInfo.fsproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Dotnet.ReproducibleBuilds" PrivateAssets="All" />
21-
<PackageReference Include="Ionide.KeepAChangelog.Tasks" PrivateAssets="All" />
2220
<PackageReference Include="FSharp.Core" />
2321
<PackageReference Include="SemanticVersioning" />
24-
<PackageReference Include="Microsoft.Build" PrivateAssets="All" />
25-
<PackageReference Include="Microsoft.Build.Framework" PrivateAssets="All" />
22+
<PackageReference Include="Microsoft.Build" IncludeAssets="compile" ExcludeAssets="runtime" PrivateAssets="all" />
23+
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="compile" ExcludeAssets="runtime" PrivateAssets="all" />
2624
</ItemGroup>
2725
</Project>

0 commit comments

Comments
 (0)