Skip to content

Avoid unnecessary recompilations #4273

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

Merged
merged 4 commits into from
Sep 3, 2018
Merged

Avoid unnecessary recompilations #4273

merged 4 commits into from
Sep 3, 2018

Conversation

snoyberg
Copy link
Contributor

This PR reduces the number of modules in the codebase which enable either TemplateHaskell or CPP, via a few techniques:

  • Moving conditional code into separate Windows and Unix directories
  • Moving all of the Store-related TH into a single module
  • Moving mkRelDir and mkRelFile calls into Stack.Constants
  • Replacing a few CPP usages with runtime checking of the OS, which I prefer using anyway (it reduces the amount of code which is only built on one OS or the other)

There should be no impact from these changes besides how it affects compile time.

@snoyberg
Copy link
Contributor Author

Note that this resolves #4272

It seems disabling CPP and TemplateHaskell allows hlint to detect other
unused pragmas.
@snoyberg snoyberg force-pushed the reduce-template-haskell branch from ef5f082 to 241aa55 Compare August 31, 2018 07:31
@snoyberg snoyberg merged commit 0740444 into master Sep 3, 2018
@snoyberg snoyberg deleted the reduce-template-haskell branch September 3, 2018 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants