Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
obsidiansystems
GHC
Commits
9c68db9d
Commit
9c68db9d
authored
May 22, 2012
by
Simon Marlow
Committed by
pcapriotti
Jun 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read the source file timestamp *before* preprocessing (#6106)
MERGED from commit
d82da293
parent
cd00c771
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
compiler/main/GhcMake.hs
compiler/main/GhcMake.hs
+11
-13
No files found.
compiler/main/GhcMake.hs
View file @
9c68db9d
...
...
@@ -1213,16 +1213,14 @@ summariseFile hsc_env old_summaries file mb_phase obj_allowed maybe_buf
=
do
let
location
=
ms_location
old_summary
-- return the cached summary if the source didn't change
src_timestamp
<-
case
maybe_buf
of
Just
(
_
,
t
)
->
return
t
Nothing
->
liftIO
$
getModificationTime
file
src_timestamp
<-
get_src_timestamp
-- The file exists; we checked in getRootSummary above.
-- If it gets removed subsequently, then this
-- getModificationTime may fail, but that's the right
-- behaviour.
if
ms_hs_date
old_summary
==
src_timestamp
-- return the cached summary if the source didn't change
if
ms_hs_date
old_summary
==
src_timestamp
then
do
-- update the object-file timestamp
obj_timestamp
<-
if
isObjectTarget
(
hscTarget
(
hsc_dflags
hsc_env
))
...
...
@@ -1231,12 +1229,17 @@ summariseFile hsc_env old_summaries file mb_phase obj_allowed maybe_buf
else
return
Nothing
return
old_summary
{
ms_obj_date
=
obj_timestamp
}
else
new_summary
new_summary
src_timestamp
|
otherwise
=
new_summary
=
do
src_timestamp
<-
get_src_timestamp
new_summary
src_timestamp
where
new_summary
=
do
get_src_timestamp
=
case
maybe_buf
of
Just
(
_
,
t
)
->
return
t
Nothing
->
liftIO
$
getModificationTime
file
new_summary
src_timestamp
=
do
let
dflags
=
hsc_dflags
hsc_env
(
dflags'
,
hspp_fn
,
buf
)
...
...
@@ -1251,11 +1254,6 @@ summariseFile hsc_env old_summaries file mb_phase obj_allowed maybe_buf
-- to findModule will find it, even if it's not on any search path
mod
<-
liftIO
$
addHomeModuleToFinder
hsc_env
mod_name
location
src_timestamp
<-
case
maybe_buf
of
Just
(
_
,
t
)
->
return
t
Nothing
->
liftIO
$
getModificationTime
file
-- getMofificationTime may fail
-- when the user asks to load a source file by name, we only
-- use an object file if -fobject-code is on. See #1205.
obj_timestamp
<-
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment