-
Notifications
You must be signed in to change notification settings - Fork 710
Put command line --with-PROG into AllPackages #5018
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
Conversation
What's up with travis? Jobs take for ever and die with random (e.g. apt-get) errors... |
I dunno what's up with Travis, but if it's a build system failure keep refreshing the failing build until it passes. I know this is orthogonal to the problem you are trying to solve, but could you take a look over |
@ezyang yea, I keep restarting them. Let's see if they eventually turn green. -- | Project configuration that is specific to each package, that is where we
-- can in principle have different values for different packages in the same
-- project.
--
data PackageConfig
= PackageConfig {
-- The following should be applied to _all_ package, I believe.
packageConfigProgramPaths :: MapLast String FilePath,
packageConfigProgramArgs :: MapMappend String [String],
packageConfigProgramPathExtra :: NubList FilePath,
-- these are specific to single packages
packageConfigFlagAssignment :: FlagAssignment,
packageConfigVanillaLib :: Flag Bool,
packageConfigSharedLib :: Flag Bool,
packageConfigStaticLib :: Flag Bool,
packageConfigDynExe :: Flag Bool,
-- not sure abount profiling.
packageConfigProf :: Flag Bool, --TODO: [code cleanup] sort out
packageConfigProfLib :: Flag Bool, -- this duplication
packageConfigProfExe :: Flag Bool, -- and consistency
packageConfigProfDetail :: Flag ProfDetailLevel,
packageConfigProfLibDetail :: Flag ProfDetailLevel,
-- XXX: this is a tricky one. We would want things like --host= to be GLOBAL
-- while other cofngiure flags we might want local only.
packageConfigConfigureArgs :: [String],
-- tricky, but covered by all-packages.
packageConfigOptimization :: Flag OptimisationLevel,
-- tricky, do we want $host-<name>, I somewhat doubt it.
-- as such it's local, or all-packages.
packageConfigProgPrefix :: Flag PathTemplate,
packageConfigProgSuffix :: Flag PathTemplate,
-- Again, not sure we'd want to force these to be global,
-- I'd argue that all-packages is the rigth place for these.
packageConfigExtraLibDirs :: [FilePath],
packageConfigExtraFrameworkDirs :: [FilePath],
packageConfigExtraIncludeDirs :: [FilePath],
packageConfigGHCiLib :: Flag Bool,
packageConfigSplitSections :: Flag Bool,
packageConfigSplitObjs :: Flag Bool,
packageConfigStripExes :: Flag Bool,
packageConfigStripLibs :: Flag Bool,
packageConfigTests :: Flag Bool,
packageConfigBenchmarks :: Flag Bool,
packageConfigCoverage :: Flag Bool,
packageConfigRelocatable :: Flag Bool,
packageConfigDebugInfo :: Flag DebugInfoLevel,
-- No idea about these.
packageConfigRunTests :: Flag Bool, --TODO: [required eventually] use this
packageConfigDocumentation :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockHoogle :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockHtml :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockHtmlLocation :: Flag String, --TODO: [required eventually] use this
packageConfigHaddockForeignLibs :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockExecutables :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockTestSuites :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockBenchmarks :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockInternal :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockCss :: Flag FilePath, --TODO: [required eventually] use this
packageConfigHaddockHscolour :: Flag Bool, --TODO: [required eventually] use this
packageConfigHaddockHscolourCss :: Flag FilePath, --TODO: [required eventually] use this
packageConfigHaddockContents :: Flag PathTemplate, --TODO: [required eventually] use this
packageConfigHaddockForHackage :: Flag HaddockTarget
}
deriving (Eq, Show, Generic) We have For all the fields, it's only the configure options for which we likely would want the As a general rule:
This PR addresses the issue at the command line parsing point. As such I'm a bit conflicted about the |
I don't have any problem with Your decision criteria seems reasonable to me, let's put it in the code! |
|
I hereby declare Travis dead. |
@ezyang the following should be resolved now:
|
Alright, LGTM. |
Looks like Travis macOS builder are hopelessly overlaoded. Also there is one run in which travis fails...
maybe this is due to travis merge logic? |
This should help with haskell#4939. `--with-PROG` flags should be applied to every package. If we change hsc2hs via `--with-hsc2hs=` or any other program and similarly `--hsc2hs-options` should also be provided to that program. Same holds for `--PROG-options`. Because we do no inherit the properties from AllPackages for LocalPackages, we need to have the set of programs and options in both.
c15f7cc
to
50bfb74
Compare
That error says that you forgot to regenerated some autogenerated parts of cabal-install.cabal. Run update-cabal-files.sh |
... though I already pushed the fix to master, so no need. |
If we agree this is good to go, I’m fine with merging without stressig poor Travis once again. macOS builds seem dead for the time being anyway, due to some capacity issues at travisci. |
Whee! It's finally green, can we merge it? |
@23Skidoo can we merge this? |
Merged, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Gah, misclicked while looking for the names of milestones, ignore me. |
In haskell#5018, I noted, that `packageConfigConfigureArgs` is a tricky field. I have since then come to the conclusion that most of the time you actually do want the `--configure-options` to be passed down.
This should help with #4939.
--with-PROG
flags should be applied to everypackage. If we change hsc2hs via
--with-hsc2hs=
or any other program andsimilarly
--hsc2hs-options
should also be provided to that program. Sameholds for
--PROG-options
. Because we do no inherit the properties fromAllPackages for LocalPackages, we need to have the set of programs and options
in both.
Please include the following checklist in your PR:
[ci skip]
is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!