Skip to content

Convenience libraries BC regret #3574

@ezyang

Description

@ezyang

Pursuant to #3573 I went back and looked at the convenience libraries changeset to find out where I broke BC. Some of these are avoidable and I'm going to BC them.

  • ComponentName had CLibName turn to CLibName String. This made the code nice and symmetric but plenty of client code needs the old version. So I'm going to unwind this back into CSubLibName String and CLibName. This also means a cluster of functions showBuildTarget, disambiguateBuildTargets, renderBuildTarget and componentStringName go back to their old type (since they need PackageId now)
  • Similarly, we'll bring back library :: Maybe Library in PackageDescription (nominating it to be the public library), and add a new field subLibraries :: [Library]
  • componentsConfig is going to come back as a helper function to massage the field into the old form. It won't be very correct with Backpack but that's ok for BC.
  • I already restored prefixRelativeInstallDirs to old behavior but maybe we should deprecate it

Here are the ones I am not going to fix unless people tell me to:

  • Fixing autogeneration to be per-component meant I plumbed ComponentLocalBuildInfo through a number of places: initialBuildSteps, writeAutogenFiles, generate, generateMacros / generateComponentIdMacro, autogenModulesDir, getLibSourceFiles, getExeSourceFiles, installIncludeFiles, PPSuffixHandler, preprocessComponent, ppGreenCard, etc. I am NOT going to rename these and bring back BC versions of them
  • HookedBuildInfo changed types. The change is for the better and I am unrepentant.
  • OriginalModule got renamed to Module. The new name is much better, and not many people were using OriginalModule anyway.
  • componentPackageRenaming was a "new" feature, it got renamed again to componentIncludes and I am unrepentant.

Some functions whose types changed but virtually no one on Hackage uses them: maybeHasName, mkComponentsLocalBuildInfo

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions