Toad World® Forums

Loading a Workspace corrupts package files / multi object scripts


#1

Toad v13.0.0.80
Windows

Loading a Workspace which has packages split into spec and body corrupts package files or multiple objects. I see this as a critical issue as it has messed up several of my source files now.

  1. Create a new package in the editor in a single editor window.

create or replace Package P_ToadMangle is
function test return integer;
end;
/
create or replace Package body P_ToadMangle is

function test return integer is
begin
return 1;
end;

end;
/

  1. Save package file as P_ToadMangle.sql.
  2. Close package in editor.
  3. Reopen, when prompted say yes to wanting to split as file contains multiple objects
  4. Save Workspace as ToadMangle.
  5. Close everything, open ToadMangle workspace.
  6. Edit something, e.g. package body, add new function

function test2 return integer is
begin
return 2;
end;

  1. Save P_ToadMangle.sql.
  2. File is now corrupted…

create or replace Package P_ToadMangle is
function test return integer;
end;
/
create or replace Package body P_ToadMangle is

function test return integer is
begin
return 1;
end;

end;
/

create or replace Package P_ToadMangle is
function test return integer;
end;
/
create or replace Package body P_ToadMangle is

function test return integer is
begin
return 1;
end;

function test2 return integer is
begin
return 2;
end;

end;
/


#2

Good timing. This was logged and I did some work here yesterday to mitigate damages by having it not split files on workspace load. Loading will load files in single tab to prevent corruption. This is in place for next beta. I will revisit this today and try to get file splitting to behave.


#3

@Paul - I’ve made some additional changes here for next beta. Please have a look at it and give your scenario a quick test if you would to see if things have improved or if there are any lingering issues.

Workspaces should now support file splitting and restore your saved workspace layout almost identically to how you saved it. There are some minor, unavoidable limitations, but they are few and the overall intention of workspaces should be respected.

Thanks,
Michael