summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hadrian: Substitute LIBRARY_*_VERSION variableswip/T22714Ben Gamari2023-01-292-2/+18
| | | | | | | This teaches Hadrian to substitute the `LIBRARY_*_VERSION` variables in `libraries/prologue.txt`, fixing #22714. Fixes #22714.
* hadrian: Refactor templating logicBen Gamari2023-01-261-61/+90
| | | | | | This refactors Hadrian's autoconf-style templating logic to be explicit about which interpolation variables should be substituted in which files. This clears the way to fix #22714 without incurring rule cycles.
* hadrian: Sphinx docs require templated cabal filesBen Gamari2023-01-261-2/+15
| | | | | | | The package-version discovery logic in `doc/users_guide/package_versions.py` uses packages' cabal files to determine package versions. Teach Sphinx about these dependencies in cases where the cabal files are generated by templates.
* Revert "Hadrian: fix doc generation"Ben Gamari2023-01-262-18/+3
| | | | | | This is too large of a hammer. This reverts commit 5640cb1d84d3cce4ce0a9e90d29b2b20d2b38c2f.
* Hadrian: fix doc generationSylvain Henry2023-01-262-3/+18
| | | | | Was missing dependencies on files generated by templates (e.g. ghc.cabal)
* Strict fields in ModNodeKey (otherwise retains HomeModInfo)Matthew Pickering2023-01-261-2/+2
| | | | Towards #22530
* Force OccName in tidyTopNameMatthew Pickering2023-01-261-1/+2
| | | | | | | This occname has just been derived from an `Id`, so need to force it promptly so we can release the Id back to the world. Another symptom of the bug caused by #19619
* Force more in NFData Name instanceMatthew Pickering2023-01-261-1/+1
| | | | | | | | | | | Doesn't force the lazy `OccName` field (#19619) which is already known as a really bad source of leaks. When we slam the hammer storing Names on disk (in interface files or the like), all this should be forced as otherwise a `Name` can easily retain an `Id` and hence the entire world. Fixes #22833
* Store dehydrated data structures in CgModBreaksMatthew Pickering2023-01-265-14/+54
| | | | | | | | | This fixes a tricky leak in GHCi where we were retaining old copies of HscEnvs when reloading. If not all modules were recompiled then these hydrated fields in break points would retain a reference to the old HscEnv which could double memory usage. Fixes #22530
* Factorize hptModulesBelowSylvain Henry2023-01-262-35/+33
| | | | | Create and use moduleGraphModulesBelow in GHC.Unit.Module.Graph that doesn't need anything from the driver to be used.
* ci: Disable HLint job due to excessive runtimeMatthew Pickering2023-01-251-1/+2
| | | | | | | | | | | | | | | | | | | | The HLint jobs takes much longer to run (20 minutes) after "Give the RTS it's own configure script" eb5a6b91 Now the CI job will build the stage0 compiler before it generates the necessary RTS headers. We either need to: * Fix the linting rules so they take much less time * Revert the commit * Remove the linting of base from the hlint job * Remove the hlint job This is highest priority as it is affecting all CI pipelines. For now I am just disabling the job because there are many more pressing matters at hand. Ticket #22830
* Fix in-scope set in specImportsSimon Peyton Jones2023-01-254-36/+87
| | | | | | | | | Nothing deep here; I had failed to bring some floated dictionary binders into scope. Exposed by -fspecialise-aggressively Fixes #22715.
* configure: support "windows" as an OSSylvain Henry2023-01-252-2/+5
|
* Fix RTS build on WindowsSylvain Henry2023-01-251-2/+0
| | | | | This change fixes a cross-compilation issue from ArchLinux to Windows because these symbols weren't found.
* Hadrian: fix Windows cross-compilationSylvain Henry2023-01-251-3/+11
| | | | | Decision to build either unix or Win32 package must be stage specific for cross-compilation to be supported.
* Hadrian: correctly detect AR at-file supportSylvain Henry2023-01-253-3/+11
| | | | | | Stage0's ar may not support at-files. Take it into account. Found while cross-compiling from Darwin to Windows.
* compiler: fix handling of MO_F_Neg in wasm NCGCheng Shao2023-01-253-4/+29
| | | | | | | | In the wasm NCG, we used to compile MO_F_Neg to 0.0-x. It was an oversight, there actually exists f32.neg/f64.neg opcodes in the wasm spec and those should be used instead! The old behavior almost works, expect when GHC compiles the -0.0 literal, which will incorrectly become 0.0.
* docs: Update INSTALL.mdMatthew Pickering2023-01-251-3/+2
| | | | | | Removes references to make. Fixes #22480
* Restore Compose's Read/Show behavior to match Read1/Show1 instancesRyan Scott2023-01-244-7/+54
| | | | Fixes #22816.
* Allow waiting for timerfd to be interrupted during rts shutdownWander Hillen2023-01-242-13/+127
|
* CmmToC: fix CmmRegOff for 64-bit register on a 32-bit targetCheng Shao2023-01-241-2/+2
| | | | | | | | | | | | | | | | | We used to print the offset value to a platform word sized integer. This is incorrect when the offset is negative (e.g. output of cmm constant folding) and the register is 64-bit but on a 32-bit target, and may lead to incorrect runtime result (e.g. #22607). The fix is simple: just treat it as a proper MO_Add, with the correct width info inferred from the register itself. Metric Increase: T12707 T13379 T4801 T5321FD T5321Fun
* Clarify where `f` is definedTom Ellis2023-01-241-4/+7
|
* Add test for T22671Matthew Pickering2023-01-242-0/+9
| | | | | | This was fixed by b13c6ea5 Closes #22671
* Fix Lint check for duplicate external namesKrzysztof Gogolewski2023-01-241-6/+5
| | | | | | | | | | Lint was checking for duplicate external names by calling removeDups, which needs a comparison function that is passed to Data.List.sortBy. But the comparison was not a valid ordering - it returned LT if one of the names was not external. For example, the previous implementation won't find a duplicate in [M.x, y, M.x]. Instead, we filter out non-external names before looking for duplicates.
* Debug: Print full NodeKey when pretty printing ModuleGraphNodeMatthew Pickering2023-01-241-1/+1
| | | | This is helpful when debugging multiple component issues.
* Finder: Look in current unit before looking in any home package dependenciesMatthew Pickering2023-01-249-1/+30
| | | | | | | | | | | | | | In order to preserve existing behaviour it's important to look within the current component before consideirng a module might come from an external component. This already happened by accident in `downsweep`, (because roots are used to repopulated the cache) but in the `Finder` the logic was the wrong way around. Fixes #22680 ------------------------- Metric Decrease: MultiComponentModules MultiComponentModulesRecomp -------------------------p
* Key ModSummary cache by UnitId as well as FilePathMatthew Pickering2023-01-247-9/+21
| | | | | | | | | | | | | | | Multiple units can refer to the same files without any problem. Just another assumption which needs to be updated when we may have multiple home units. However, there is the invariant that within each unit each file only maps to one module, so as long as we also key the cache by UnitId then we are all good. This led to some confusing behaviour in GHCi when reloading, multipleHomeUnits_shared distils the essence of what can go wrong. Fixes #22679
* Improve driver diagnostic messages by including UnitId in messageMatthew Pickering2023-01-2414-49/+61
| | | | | | | | | | Currently the driver diagnostics don't give any indication about which unit they correspond to. For example `-Wmissing-home-modules` can fire multiple times for each different home unit and gives no indication about which unit it's actually reporting about. Perhaps a longer term fix is to generalise the providence information away from a SrcSpan so that these kind of whole project errors can be reported with an accurate provenance. For now we can just include the `UnitId` in the error message. Fixes #22678
* Don't write o-boot files in Interactive modeMatthew Pickering2023-01-245-15/+36
| | | | | | | | We should not be producing object files when in interactive mode but we still produced the dummy o-boot files. These never made it into a `Linkable` but then confused the recompilation checker. Fixes #22669
* Recompilation checking: Don't try to find artefacts for Interactive & ↵Matthew Pickering2023-01-243-62/+74
| | | | | | | | | | hs-boot combo In interactive mode we don't produce any linkables for hs-boot files. So we also need to not going looking for them when we check to see if we have all the right objects needed for recompilation. Ticket #22669
* Use NodeKey rather than ModuleName in pruneCacheMatthew Pickering2023-01-241-3/+10
| | | | | | | | | | | The `pruneCache` function assumes that the list of `CachedInfo` all have unique `ModuleName`, this is not true: * In normal compilation, the same module name can appear for a file and it's boot file. * In multiple home unit compilation the same ModuleName can appear in different units The fix is to use a `NodeKey` as the actual key for the interfaces which includes `ModuleName`, `IsBoot` and `UnitId`. Fixes #22677
* Augment target filepath by working directory when checking if module ↵Matthew Pickering2023-01-243-1/+5
| | | | | | | | | | | | satisfies target This fixes a spurious warning in -Wmissing-home-modules. This is a simple oversight where when looking for the target in the first place we augment the search by the -working-directory flag but then fail to do so when checking this warning. Fixes #22676
* Fix recompilation checking for multiple home unitsMatthew Pickering2023-01-2416-21/+84
| | | | | | | | | | | | | | | The key part of this change is to store a UnitId in the `UsageHomeModule` and `UsageHomeModuleInterface`. * Fine-grained dependency tracking is used if the dependency comes from any home unit. * We actually look up the right module when checking whether we need to recompile in the `UsageHomeModuleInterface` case. These scenarios are both checked by the new tests ( multipleHomeUnits_recomp and multipleHomeUnits_recomp_th ) Fixes #22675
* Do not collect compile-time metrics for T21839rMatthew Craven2023-01-233-3/+7
| | | | | | | | | ...the testsuite doesn't handle this properly since it also collects run-time metrics. Compile-time metrics for this test are already tracked via T21839c. Metric Decrease: T21839r
* codeowners: Add Ben, Matt, and Bryan to CIwip/ci-codeownersBryan Richter2023-01-231-0/+4
|
* Fix #22742Simon Peyton Jones2023-01-234-4/+22
| | | | | | | | | | | | | runtimeRepLevity_maybe was panicing unnecessarily; and the error printing code made use of the case when it should return Nothing rather than panicing. For some bizarre reason perf/compiler/T21839r shows a 10% bump in runtime peak-megagbytes-used, on a single architecture (alpine). See !9753 for commentary, but I'm going to accept it. Metric Increase: T21839r
* ghcup metadata: Remove viPostRemove field from generated metadataMatthew Pickering2023-01-231-1/+0
| | | | This has been removed from the downstream metadata.
* ghcup metadata: Fix subdir for windows bindistMatthew Pickering2023-01-231-1/+1
|
* Bump process submoduleCheng Shao2023-01-232-1/+3
| | | | | | | Includes a critical fix for wasm32, see https://github.com/haskell/process/pull/272 for details. Also changes the existing cross test to include process stuff and avoid future regression here.
* hadrian: disable alloca for in-tree GMP on wasm32Cheng Shao2023-01-231-1/+9
| | | | | When building in-tree GMP for wasm32, disable its alloca usage, since it may potentially cause stack overflow (e.g. #22602).
* template-haskell: Bump version to 2.20.0.0Ben Gamari2023-01-237-5/+5
| | | | | | Updates `text` and `exceptions` submodules for bounds bumps. Addresses #22767.
* EPA: Add SourceText to HsOverLabelAlan Zimmerman2023-01-2318-32/+107
| | | | | | To be able to capture string literals with possible escape codes as labels. Close #22771
* Set "since: 9.8" for TypeAbstractions and -Wterm-variable-captureVladislav Zavialov2023-01-236-8/+18
| | | | | These flags did not make it into the 9.6 release series, so the "since" annotations must be corrected.
* gitlab-ci: Add Rocky8 jobsBen Gamari2023-01-232-1/+133
| | | | Addresses #22268.
* hadrian: add missing docs for recently added flavour transformersCheng Shao2023-01-231-0/+16
|
* hadrian: add hi_core flavour transformerCheng Shao2023-01-231-0/+9
| | | | | | | | The hi_core flavour transformer enables -fwrite-if-simplified-core for stage1 libraries, which emit core into interface files to make it possible to restart code generation. Building boot libs with it makes it easier to use GHC API to prototype experimental backends that needs core/stg at link time.
* Fix printing of promoted MkSolo datacon (#22785)Andrei Borzenkov2023-01-1811-19/+39
| | | | | | | | | | | | Problem: In 2463df2f, the Solo data constructor was renamed to MkSolo, and Solo was turned into a pattern synonym for backwards compatibility. Since pattern synonyms can not be promoted, the old code that pretty-printed promoted single-element tuples started producing ill-typed code: t :: Proxy ('Solo Int) This fails with "Pattern synonym ‘Solo’ used as a type" The solution is to track the distinction between type constructors and data constructors more carefully when printing single-element tuples.
* Add regression test for #22151Ryan Scott2023-01-182-0/+17
| | | | | | | | | Issue #22151 was coincidentally fixed in commit aed1974e92366ab8e117734f308505684f70cddf (`Refactor the treatment of loopy superclass dicts`). This adds a regression test to ensure that the issue remains fixed. Fixes #22151.
* nativeGen/X86: MFENCE is unnecessary for release semanticsBen Gamari2023-01-181-1/+1
| | | | | | | | | | | In #22764 a user noticed that a program implementing a simple atomic counter via an STRef regressed significantly due to the introduction of necessary atomic operations in the MutVar# primops (#22468). This regression was caused by a bug in the NCG, which emitted an unnecessary MFENCE instruction for a release-ordered atomic write. MFENCE is rather only needed to achieve sequentially consistent ordering. Fixes #22764.
* ghc-pkg does not have to depend on terminfoBodigrim2023-01-182-45/+17
|