summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-02use ConstraintKindsJoey Hess
This is just a bit prettier code than manually needing to use constraint ~ True
2019-07-02improve changelogJoey Hess
2019-07-02reword to be more like ghc wordingJoey Hess
2019-07-02better explain Property <unknown>Joey Hess
I had thought it could happen when passing the wrong type to a Property constructor, but happily that is not the case. For example & osDebian Unstable False Still produces a good error: • Couldn't match expected type ‘Architecture’ with actual type ‘Bool’ So Property <unknown> only happens when too many or too few parameters are passed, eg: & osDebian Unstable X86_64 False & osDebian Unstable Before commit 14f6ae30809d8bbdb10b91cc59757e865a365df8, the former of those resulted in: • Couldn't match expected type ‘[Char] -> p0’ with actual type ‘Property (HasInfo + Debian)’ • The function ‘osDebian’ is applied to three arguments, but its type ‘DebianSuite -> Architecture -> Property (HasInfo + Debian)’ has only two Unfortunately, it's now just Property <unknown>. This is the only reversion I've identified from commit 14f6ae30809d8bbdb10b91cc59757e865a365df8. My ghc bug https://gitlab.haskell.org/ghc/ghc/issues/16894 isn't quite explaining this problem yet, and I need to find a minimal case of it. As to the latter with too few parameters, it used to result in a massive ugly useless error. Now it is also Property <unknown>, which is an improvement.
2019-07-02use DelayErrorJoey Hess
Syrak looked at this branch and said: Cool! I'd suggest that if it's working, that's an accident! You probably want IfStuck e (DelayError err1) (DelayErrorFcf err2) rather than IfStuck e (TypeError err1) (TypeError err2)
2019-07-02Revert "Revert "custom type error messages""Joey Hess
This reverts commit 665ea0d3d9e1b0e90278fd659dee0ef8642030da.
2019-07-02Merge branch 'joeyconfig' into custom-error-typesJoey Hess
2019-07-02point to branchJoey Hess
2019-07-02Revert "custom type error messages"Joey Hess
This reverts commits 14f6ae30809d8bbdb10b91cc59757e865a365df8 de21ef26861db458b0dfb0212cf501f9f8ed459b e20662e6a8881db55394a6366be17ca4e509bc2a Until this bug is resolved, these custom error types hide more basic errors. https://gitlab.haskell.org/ghc/ghc/issues/16894
2019-07-02clean up after mergeJoey Hess
2019-07-01fix build with ghc 8.0.1Joey Hess
Something in commit 14f6ae30809d8bbdb10b91cc59757e865a365df8 ghc 8.0.1 in a few cases unable to infer types when ensureProperty or tightenTargets is used. Newer versions of ghc, including 8.4.4 were able to infer these types. Perhaps it tries harder, or an inference bug was fixed. Seemed best to work around the problem to keep supporting ghc 8.0.1 and the current Debian stable. Since only 3 uses out of hundreds in propellor were affected, it's pretty unlikely it will affect user's properties, but I mentioned in in the changelog anyway. Hopefully a new Debian release will soon mean I no longer need to support 8.0.1, but the code changes also generally made it clearer and easier to read. And, I made custom type errors suggesting adding annotations to help any user who does encounter it. (Included in commit de21ef26861db458b0dfb0212cf501f9f8ed459b; may also help with other cases than an old ghc.)
2019-07-01optionally use type-errors to detect stucknessJoey Hess
Use the type-errors library to detect when the type checker gets stuck unable to reduce type-level operations on MetaTypes, and avoid displaying massive error messages in such a case. But, since type-errors is a new library not available in eg Debian yet, added a WithTypeErrors build flag. When the library is not available, cabal will automatically disable that build flag, and it will build without the type-errors library. This is most often used when combining properties of different types. If the MetaTypes don't have an OS in common, the error message used to be "Property " followed by pages of MetaTypes operations. Now it looks like this: • Cannot combine Properties: Property <unknown> Property HasInfo + Debian + Buntish + ArchLinux + FreeBSD (Property <unknown> is often due to a partially applied Property constructor, or due to passing the wrong type to a Property constructor.) Also it's used in ensureProperty to detect a case where the outer MetaTypes need to be inferred in order to check if the inner MetaTypes match, but the type checker is unable to infer it: • ensureProperty outer Property type is not able to be inferred here. Consider adding a type annotation. • When checking the inferred type writeConfig :: forall (outer :: [Propellor.Types.MetaTypes.MetaType]) t. And it's used in tightenTargets to detect when ghc is unable to infer the desired type of Property: • Unable to infer desired Property type in this use of tightenTargets. Consider adding a type annotation. • When checking the inferred type mk :: forall (tightened :: [Propellor.Types.MetaTypes.MetaType]).
2019-07-01custom type error messagesJoey Hess
* Avoid displaying an excessive amount of type error messages when many properties have been combined in a props list. * Added custom type error messages when Properties don't combine due to conflicting metatypes. * Added custom type error messages for ensureProperty and tightenTargets. * ensureProperty: The constraints have been simplified to EnsurePropertyAllowed. (API change) * ensureProperty: The contraints have been simplified to TightenTargetsAllowed. (API change) * CheckCombinable generates a Bool. (API change) This commit was sponsored by Jake Vosloo on Patreon.
2019-07-01setting up joeyconfig after mergeJoey Hess
2019-07-01Merge branch 'master' into joeyconfigJoey Hess
2019-07-01remove no longer needed -fno-warn-redundant-constraintsJoey Hess
Commit b1038365960693a013d7026f25d026a1fd098062 suggested that it be moved to per-module when support for ghc 7 was dropped, so I removed it from the cabal file, but there were no build warnings without it so did not need to add it to any modules. (Tested only with ghc 8.4.4)
2019-07-01fixJoey Hess
2019-07-01type-errors libraryJoey Hess
2019-06-30moar watchdogJoey Hess
2019-06-15Merge branch 'joeyconfig'Joey Hess
2019-06-15responseJoey Hess
2019-06-15Merge branch 'master' of ssh://propellor.branchable.comJoey Hess
2019-06-15changelogJoey Hess
2019-06-15Libvirt.installed: install libvirt-daemon-systemDavid Bremner
Several things recommend libvirt-daemon, but not for whatever reason libvirt-daemon-system. This means the libvirt-daemon is not started, which can cause virt-install to fail. Installing libvirt-daemon explicitly is probably overkill, but avoids problems in case the dependencies of libvirt-daemon-system change.
2019-06-15Added a comments@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd
2019-06-08Added a commentspwhitton
2019-06-08(no commit message)david
2019-06-06Added a comments@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd
2019-06-06Added a comments@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd
2019-06-05Added a commentspwhitton
2019-06-04Added a comments@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd
2019-06-03propellor spinJoey Hess
2019-06-03Added a commentspwhitton
2019-06-02Added a comments@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd
2019-06-02Added a commentspwhitton
2019-06-02Added a commentspwhitton
2019-05-30(no commit message)david
2019-05-29(no commit message)david
2019-05-29New post about merging upstream changes.s@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd
2019-05-18post TODOspwhitton
2019-05-13propellor spinJoey Hess
2019-05-13propellor spinJoey Hess
2019-05-04propellor spinJoey Hess
2019-04-26add news item for propellor 5.8.0Joey Hess
2019-04-26releasing package propellor version 5.8.0Joey Hess
2019-04-25propellor spinJoey Hess
2019-04-25propellor spinJoey Hess
2019-04-22clean up after mergeJoey Hess
2019-04-22Merge branch 'joeyconfig'Joey Hess
2019-04-22updateJoey Hess