Bug 562019

Summary: Regression: Executing a launch edits the *.launch
Product: [Eclipse Project] Platform Reporter: Ed Willink <ed>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 CC: dh_tue, eclipse, rolf.theunissen, sarika.sinha
Version: 4.15   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=14758
Whiteboard:

Description Ed Willink CLA 2020-04-11 09:15:31 EDT
In 4.15 executing a longstanding launch changes the *.launch file e.g. it adds:

<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.ocl.examples.build"/>

While it may be appropriate for the launch loader to upgrade old launch files, it is not permitted for the chanage to be written back to disk provoking a GIT chnage that may not be appropriate for the user's other needs.

Editing a *.launch is performed using an editor, e.g. the launch dialog. Launching itself is not an edit operation.
Comment 1 Sarika Sinha CLA 2020-04-22 03:15:23 EDT
I don't think we can do much about this, the code to save the tabs has been there since starting, and user can choose to reject the change if they are not interested. Addition of new attributes might be required for few cases which will lead to these changes but they are not common and doesn't happen in years.
Comment 2 Ed Willink CLA 2020-04-22 15:21:48 EDT
It's a regression. Revert the bad 'improvment'.

I check out a known state. I run the tests. Oops I need to check something in.

Running a test must not corrupt the checked out files.
Comment 3 Dennis Hendriks CLA 2020-06-05 06:08:05 EDT
I've recently been having a similar issue.

Steps:
 - I launch an Eclipse runtime instance using an 'Eclipse Application' launch configuration.
 - I restart the runtime instance using File -> Restart.

I then observe the following gets added to the launch configuration file:

<booleanAttribute key="restart" value="true"/>

I don't know what this 'restart' attribute does. I don't know whether to commit this change to Git or not. I do know I don't like to have to revert this change regularly.

If I edit the launch configuration using the Run Configurations dialog, this doesn't get added.