swiftlang / swift-installer-scripts

Apache License 2.0
73 stars 38 forks source link

features.json is missing from Windows installer for docc #337

Open jakepetroules opened 2 months ago

jakepetroules commented 2 months ago

We probably need a section similar to this, but for docc:

<ComponentGroup Id="SwiftFeatures" Directory="_usr_share_swift">
  <Component>
    <File Source="$(TOOLCHAIN_ROOT)\usr\share\swift\features.json" />
  </Component>
</ComponentGroup>
compnerd commented 2 months ago

DocC currently isn't usable on windows due to the missing pending change (CC: @FranzBusch). I'm happy to add the features.json for clang though.

compnerd commented 2 months ago

https://github.com/swiftlang/swift-installer-scripts/blob/main/platforms/Windows/bld/bld.wxs#L158-L162

It seems that the clang features.json is already present. @jakepetroules is there something that I'm missing here?

jakepetroules commented 2 months ago

It's referenced in the WiX sources but doesn't actually get installed on the system. Does WiX not error out if it references a file that doesn't exist when building the installer?

compnerd commented 2 months ago

Yes, if the file is missing the installer will fail to build.

jakepetroules commented 2 months ago

Oh, looks like you fixed clang in fe35b366c51c4d9d5ebeefe35ea5bc49f7c6925d, but that's not in the 6.0 branch. I'll update the title to reflect that this is only an issue for docc, then.

What's the docc usability issue you were referencing above?

compnerd commented 2 months ago

DocC cannot generate the documentation on Windows due to the use of : in the filenames. There is an existing PR (https://github.com/swiftlang/swift-docc/pull/668) that adjusts that, but I think that there is still lack of clarity on how to migrate to that.

jakepetroules commented 2 months ago

Thanks for the reference. I think those two issues could be resolved in parallel, though.

compnerd commented 2 months ago

Yeah, I suppose that we could start building it. The one issue is the build times - I think that using CMake resulted in a 7% build time improvement as well as alleviated some bloat due to being able to do dynamic linking against other toolchain components.

jakepetroules commented 2 months ago

To be clear, we are currently shipping docc.exe as part of the Swift Windows installer already. Just the features.json is missing.

compnerd commented 2 months ago

To be clear, we are currently shipping docc.exe as part of the Swift Windows installer already. Just the features.json is missing.

Interesting, I don't remember getting that enabled, but that is great!

jakepetroules commented 2 months ago

Oh, you may be right. I remember seeing it in some toolchain build at least, maybe that was an older version and it's since been removed again.