Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 636
    • Merge requests 636
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #22952
Closed
Open
Issue created Feb 10, 2023 by Luite Stegeman@luiteDeveloper

Dirs created by GHC.Utils.TmpFs.newTempDir cannot be removed

GHC.Utils.TmpFs.newTempDir creates a new ghc_N subdirectory in a temp directory, but this directory cannot be removed. The result is a warning at the end of the GHC run.

It's not possible to clean this ghc_N subdirectory using addFilesToClean:

  • addFilesToClean uses removeFile and fails for directories
  • the to-clean list is kept in a Set FilePath and doesn't preserve the order in which the files were added, so a dir could potentially be removed before the files contained in it.

I've come up with two ideas to fix it

  • when removing a top-level ghc temp dir, automatically remove empty ghc_N subdirs inside it (in cleanTempDirs)
  • keep track of all created ghc_N by newTempDir and remove them as the first step in cleanTempDirs

Any preferences or other ideas?

Edited Feb 10, 2023 by Luite Stegeman
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking