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

Add 'optional-target' field to plan.json #5659

Merged
merged 4 commits into from Nov 11, 2018

Conversation

DanielG
Copy link
Collaborator

@DanielG DanielG commented Nov 3, 2018

Having this enables tooling to give better error messages when build output is
missing. cabal-install can choose to include optional components in the build
plan even though they weren't requested explicitly by the user. Currently
tooling would have to assume missing build output after a v2-build all call
means the component is currently disabled, which is just not very clean.


Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.

haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"linux-7.6.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"linux-8.2.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"linux-8.4.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"linux-8.4.4-fdebug-expensive-assertions"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"osx-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 4, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "1b520a8ea291898781b8f2da74c7d30d034ecae7",
"tag":"osx-7.10.3"
}
@DanielG DanielG requested a review from hvr November 4, 2018 15:59
Copy link
Member

@hvr hvr left a comment

Choose a reason for hiding this comment

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

When designing the plan.json scheme we intentionally did not include this information (I remember discussing this with ezyang a couple years ago). However, while I'm not happy about conflating a degree of freedom frontend-UI concern into plan.json which is supposed to be UI-agnostic; but since we don't have a buildinfo.json companion metadata file yet, this seems like a tolerable tech debt to incur if it helps get us HIE support sooner rather than later.

cabal-install/Distribution/Client/ProjectPlanOutput.hs Outdated Show resolved Hide resolved
cabal-install/Distribution/Client/ProjectPlanOutput.hs Outdated Show resolved Hide resolved
@hvr
Copy link
Member

hvr commented Nov 10, 2018

@23Skidoo I just realised after talking to the HIE devs, this is really important for the haskell-ide-engine integration of new-build, hence I intend to get this ready for merging today and inclusion in the 2.4 point rls of exe:cabal

@hvr hvr self-assigned this Nov 10, 2018
@hvr hvr added this to the 2.4.0.1 milestone Nov 10, 2018
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-7.6.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-8.2.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-8.4.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-8.6.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"linux-8.4.4-fdebug-expensive-assertions"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"osx-7.8.4"
}
@23Skidoo
Copy link
Member

@hvr OK, noted.

haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"osx-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "adfc9279a234a06ec6d7ec93090a5d74c480185a",
"tag":"osx-8.0.2"
}
@hvr hvr changed the title Add 'requested-by-default' field to plan.json Add 'optional-target' field to plan.json Nov 10, 2018
@hvr
Copy link
Member

hvr commented Nov 10, 2018

@23Skidoo I've rebased this and renamed the flag; I've been dogfooding this a bit and it looks good to me;

IOW, it's ready to merge from my POV

haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-8.2.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-7.6.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-8.4.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-8.6.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"linux-8.4.4-fdebug-expensive-assertions"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"osx-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"osx-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 10, 2018
"url":"pull/5659",
"account":"haskell",
"repo":"cabal",
"commit": "e90007d2a064c8036625a8d9485df2fa4428925c",
"tag":"osx-7.10.3"
}
DanielG and others added 4 commits November 11, 2018 20:20
Having this enables tooling to give better error messages when build output is
missing. cabal-install can choose to include optional components in the build
plan even though they weren't requested explicitly by the user. Currently
tooling would have to assume missing build output after a `v2-build all` call
means the component is currently disabled, which is just not very clean.
I prefer the convention that omitted boolean JSON fields default
to being `false`. Also, "target" makes it a bit more evident
this is about CLI targets.
@23Skidoo 23Skidoo merged commit bba31e6 into haskell:master Nov 11, 2018
@phadej
Copy link
Collaborator

phadej commented Nov 11, 2018 via email

@23Skidoo
Copy link
Member

Merged, thanks! Also cherry-picked to 2.4.

23Skidoo added a commit that referenced this pull request Nov 11, 2018
Add 'optional-target' field to plan.json

(cherry picked from commit bba31e6)
@hvr
Copy link
Member

hvr commented Nov 11, 2018

@phadej re buildinfo.json -- there's a ticket about a variant of it: #2771

hvr added a commit that referenced this pull request Nov 20, 2018
@DanielG DanielG deleted the plan-json-req-by-default branch November 21, 2018 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants