Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Why3
why3
Commits
f4579d83
Commit
f4579d83
authored
6 years ago
by
Sylvain Dailler
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue_371_ide_slow_syntax_erros' into 'master'
Issue 371 ide slow syntax erros Closes
#371
See merge request
!213
parents
c05154d9
c59a224b
No related branches found
No related tags found
1 merge request
!213
Issue 371 ide slow syntax erros
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/session/itp_server.ml
+23
-5
23 additions, 5 deletions
src/session/itp_server.ml
with
23 additions
and
5 deletions
src/session/itp_server.ml
+
23
−
5
View file @
f4579d83
...
...
@@ -1346,6 +1346,16 @@ end
Ident
.
Hid
.
clear
th_to_node_ID
;
Hfile
.
clear
file_to_node_ID
let
notify_parsing_errors
l
=
List
.
iter
(
function
(
loc
,
rel_loc
,
s
)
->
P
.
notify
(
Message
(
Parse_Or_Type_Error
(
loc
,
rel_loc
,
s
))))
l
(* Save the last parsing errors that occured. Report them when an invalid
command (transformation/etc) is entered before reloading. *)
let
parsing_errors
=
ref
[]
let
reload_session
()
:
unit
=
let
d
=
get_server_data
()
in
(* interrupt all running provers and unfocus before reload *)
...
...
@@ -1356,16 +1366,16 @@ end
let
l
=
reload_files
d
.
cont
~
shape_version
:
(
Some
Termcode
.
current_shape_version
)
in
reset_and_send_the_whole_tree
()
;
match
l
with
|
[]
->
(* TODO: try to restore the previous focus : focused_node := old_focus; *)
(* Only reset the tree when there is no errors (for efficiency of ide) *)
parsing_errors
:=
[]
;
reset_and_send_the_whole_tree
()
;
P
.
notify
(
Message
(
Information
"Session refresh successful"
))
|
l
->
List
.
iter
(
function
(
loc
,
rel_loc
,
s
)
->
P
.
notify
(
Message
(
Parse_Or_Type_Error
(
loc
,
rel_loc
,
s
))))
l
parsing_errors
:=
l
;
notify_parsing_errors
l
let
replay
~
valid_only
nid
:
unit
=
let
d
=
get_server_data
()
in
...
...
@@ -1598,6 +1608,14 @@ end
(* Check that the request does not refer to obsolete node_ids *)
if
not
(
request_is_valid
r
)
then
begin
if
!
parsing_errors
<>
[]
then
begin
(* There were parsing errors and no reloads. *)
P
.
notify
(
Message
(
Error
"Cannot handle this command while the \
parsing error is not resolved. You can try \
reloading the session or removing detached \
files."
));
notify_parsing_errors
!
parsing_errors
end
;
(* These errors come from the client-server behavior of itp. They cannot
be completely avoided and could be safely ignored.
They are ignored if a debug flag is not added.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment