Commit 027017fb authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Remove ghctags (#16274)

parent 53a870f4
Pipeline #2029 passed with stages
in 221 minutes and 54 seconds
......@@ -482,9 +482,6 @@ endif
ifneq "$(BINDIST)" "YES"
compiler_stage2_TAGS_HC_OPTS = -package ghc
$(eval $(call tags-package,compiler,stage2))
$(compiler_stage1_depfile_haskell) : compiler/stage1/$(PLATFORM_H)
$(compiler_stage2_depfile_haskell) : compiler/stage2/$(PLATFORM_H)
$(compiler_stage3_depfile_haskell) : compiler/stage3/$(PLATFORM_H)
......
......@@ -340,7 +340,6 @@ include rules/build-perl.mk
include rules/build-package.mk
include rules/build-package-way.mk
include rules/haddock.mk
include rules/tags-package.mk
include rules/foreachLibrary.mk
# -----------------------------------------------------------------------------
......@@ -553,7 +552,6 @@ ghc/stage2/package-data.mk: compiler/stage2/package-data.mk
# the ghc library's package-data.mk is sufficient, as that in turn depends on
# all the other libraries' package-data.mk files.
utils/haddock/dist/package-data.mk: compiler/stage2/package-data.mk
utils/ghctags/dist-install/package-data.mk: compiler/stage2/package-data.mk
utils/check-api-annotations/dist-install/package-data.mk: compiler/stage2/package-data.mk
utils/check-ppr/dist-install/package-data.mk: compiler/stage2/package-data.mk
......@@ -666,7 +664,6 @@ BUILD_DIRS += compiler
BUILD_DIRS += utils/hsc2hs
BUILD_DIRS += utils/ghc-pkg
BUILD_DIRS += utils/testremove
BUILD_DIRS += utils/ghctags
BUILD_DIRS += utils/check-api-annotations
BUILD_DIRS += utils/check-ppr
BUILD_DIRS += utils/ghc-cabal
......@@ -716,7 +713,6 @@ endif
ifneq "$(CrossCompiling) $(Stage1Only)" "NO NO"
# See Note [No stage2 packages when CrossCompiling or Stage1Only].
# See Note [Stage1Only vs stage=1] in mk/config.mk.in.
BUILD_DIRS := $(filter-out utils/ghctags,$(BUILD_DIRS))
BUILD_DIRS := $(filter-out utils/check-api-annotations,$(BUILD_DIRS))
BUILD_DIRS := $(filter-out utils/check-ppr,$(BUILD_DIRS))
endif
......@@ -845,12 +841,6 @@ libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs: \
| $$(dir $$@)/.
"$(genprimopcode_INPLACE)" --make-haskell-source < $< > $@
.PHONY: tags
tags: tags_compiler
.PHONY: TAGS
TAGS: TAGS_compiler
# -----------------------------------------------------------------------------
# Installation
......@@ -1512,8 +1502,8 @@ endif
# - neither do we register the ghc library (compiler/stage1) that we build
# with stage0. TODO Why not? We do build it...
# - as a result, we need to a) use ghc-stage2 to build packages that depend on
# the ghc library (e.g. ghctags [4]) and b) exclude those packages when
# ghc-stage2 is not available.
# the ghc library and b) exclude those packages when ghc-stage2 is not
# available.
# - when Stage1Only=YES, it's clear that ghc-stage2 is not available (we just
# said we didn't want it), so we have to exclude the stage2 packages from
# the build. This includes the case where Stage1Only=YES is combined with
......@@ -1521,7 +1511,7 @@ endif
# - when CrossCompiling=YES, but Stage1Only=NO (Cross-compiling GHC itself
# [3]), we can not use ghc-stage2 either. The reason is that stage2 doesn't
# run on the host platform at all; it is built to run on $(TARGETPLATFORM)"
# [5]. Therefore in this case we also have to exclude the stage2 packages
# [4]. Therefore in this case we also have to exclude the stage2 packages
# from the build.
#
# Because we omit certain packages from the build when CrossCompiling=YES,
......@@ -1536,10 +1526,7 @@ endif
#
# [3] https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling
#
# [4] 5fb72555f7b7ab67a33583f33ad9160761ca434f
# "ghctags needs the stage2 compiler, since it uses the GHC API."
#
# [5] * bc31dbe8ee22819054df60f5ef219fed393a1c54
# [4] * bc31dbe8ee22819054df60f5ef219fed393a1c54
# "Disable any packages built with stage 2 when cross-compiling
# Since we can't run stage 2 on the host."
#
......
......@@ -4,7 +4,7 @@ module Packages (
array, base, binary, bytestring, cabal, checkApiAnnotations, checkPpr,
compareSizes, compiler, containers, deepseq, deriveConstants, directory,
filepath, genapply, genprimopcode, ghc, ghcBoot, ghcBootTh, ghcCompact,
ghcHeap, ghci, ghcPkg, ghcPrim, ghcTags, ghcSplit, haddock, haskeline,
ghcHeap, ghci, ghcPkg, ghcPrim, ghcSplit, haddock, haskeline,
hsc2hs, hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, libffi,
libiserv, mtl, parsec, parallel, pretty, primitive, process, rts, runGhc,
stm, templateHaskell, terminfo, text, time, timeout, touchy, transformers,
......@@ -33,7 +33,7 @@ ghcPackages =
[ array, base, binary, bytestring, cabal, checkPpr, checkApiAnnotations
, compareSizes, compiler, containers, deepseq, deriveConstants, directory
, filepath, genapply, genprimopcode, ghc, ghcBoot, ghcBootTh, ghcCompact
, ghcHeap, ghci, ghcPkg, ghcPrim, ghcTags, haddock, haskeline, hsc2hs, hp2ps
, ghcHeap, ghci, ghcPkg, ghcPrim, haddock, haskeline, hsc2hs, hp2ps
, hpc, hpcBin, integerGmp, integerSimple, iserv, libffi, libiserv, mtl
, parsec, parallel, pretty, process, rts, runGhc, stm, templateHaskell
, terminfo, text, time, touchy, transformers, unlit, unix, win32, xhtml
......@@ -68,7 +68,6 @@ ghcHeap = lib "ghc-heap"
ghci = lib "ghci"
ghcPkg = util "ghc-pkg"
ghcPrim = lib "ghc-prim"
ghcTags = util "ghctags"
ghcSplit = util "ghc-split"
haddock = util "haddock"
haskeline = lib "haskeline"
......
......@@ -108,8 +108,8 @@ stage1Packages = do
, stm
, time
, unlit
, xhtml
, ghcTags ]
, xhtml
]
++ [ haddock | not cross ]
++ [ hpcBin | not cross ]
++ [ iserv | not win, not cross ]
......
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
# http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
# http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------
# Build the tags files for a package. Use like this:
#
# $(eval $(call tags-package,compiler,stage2))
#
# Uses the same metadata as build-package.
define tags-package
$(call trace, tags-package($1,$2))
$(call profStart, tags-package($1,$2))
# $1 = dir
# $2 = distdir
.PHONY: tags_$1
tags_$1:
inplace/bin/ghctags --topdir $$(TOP)/inplace/lib -c --use-cabal-config $1/$2 -- $$($1_$2_TAGS_HC_OPTS) $$($1_$2_v_ALL_HC_OPTS) -- $$($1_$2_HS_SRCS)
.PHONY: TAGS_$1
TAGS_$1:
inplace/bin/ghctags --topdir $$(TOP)/inplace/lib -e --use-cabal-config $1/$2 -- $$($1_$2_TAGS_HC_OPTS) $$($1_$2_v_ALL_HC_OPTS) -- $$($1_$2_HS_SRCS)
$(call profEnd, tags-package($1,$2))
endef
This diff is collapsed.
This program should eventually replace the lexically-based
tags program. But before this can happen, several problems
must be addressed:
* Performance is disastrous: it takes much longer to run ghctags
than it does to compile GHC
* The program does not use the correct source-code locations
The program accepts both its own arguments and options intended for GHC.
As a quick self-test, you can run
./ghctags -- -package ghc -- GhcTags.hs
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
# http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
# http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------
utils/ghctags_USES_CABAL = YES
utils/ghctags_PACKAGE = ghctags
utils/ghctags_dist-install_PROGNAME = ghctags
utils/ghctags_dist-install_INSTALL = NO
utils/ghctags_dist-install_INSTALL_INPLACE = YES
$(eval $(call build-prog,utils/ghctags,dist-install,2))
Name: ghctags
Version: 0.1
Copyright: XXX
License: BSD3
-- XXX License-File: LICENSE
Author: XXX
Maintainer: XXX
Synopsis: A simple generator of vi- and emacs-compatible TAGS files.
Description: XXX
Category: Development
build-type: Simple
cabal-version: >=1.10
Executable ghctags
Default-Language: Haskell2010
Main-Is: Main.hs
Build-Depends: base >= 4 && < 5,
containers,
Cabal >= 2.5 && <2.6,
ghc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment