bugLiberty Eiffel - Bugs: bug #62148, Pretty deletes assigns

 
 

bug #62148: Pretty deletes assigns

Submitter:  Paolo Redaelli <Tybor>
Submitted:  Mon 07 Mar 2022 04:01:07 PM UTC
   
 
Category:  Liberty tools Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Confirmed
Assigned to:  None Open/Closed:  Open
Release:  None Fixed Release:  None
Planned Release:  curtiss
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 13 Feb 2024 11:08:20 PM UTC, comment #3: 

Testing pretty:

$ find test/ -type f -name 'test*.e' -exec se pretty -default "{}" \;

and check that output of

$ git status --porcelain test/

is empty?

Jakub PavlĂ­k <igneus>
Wed 17 Jan 2024 10:30:21 PM UTC, comment #2: 

A quick note, in the feature subcluster of the compiler


feature assigner: FEATURE_NAME -- If this feature can be assigned to, the assigner feature name.


is declared in ANONYMOUS_FEATURE while it seems to me a little too generic. Also EFFECTIVE_ROUTINE is "too wide" as it is kown children are E_FUNCTION, E_PROCEDURE, ONCE_ROUTINE, and E_FUNCTION can't be an assign an attribute

Shouldn't it be declared into E_PROCEDURE?

Paolo Redaelli <Tybor>
Group administrator
Mon 07 Mar 2022 09:29:31 PM UTC, comment #1: 

good catch. These issues are likely to affect all (future) language/syntax changes, as we will forget to adjust pretty :-(

any ideas how we can test pretty in ET? Running pretty on ALL tests before compiling them could be quite hard...

Raphael Mack <ramack>
Group administrator
Mon 07 Mar 2022 04:01:07 PM UTC, original submission:  

A class processed by pretty loses its assigns:

class FOO
feature
  value: INTEGER
  set_value(a_value:INTEGER) assign value
  do
    value:=a_value
  end
end

is changed by pretty into

class FOO
feature
  value: INTEGER
  set_value(a_value:INTEGER)
  do
    value:=a_value
  end
end

Quite obviously it will break other people code.

Paolo Redaelli <Tybor>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by igneus (Posted a comment)
  • -email is unavailable- added by ramack (Posted a comment)
  • -email is unavailable- added by Tybor (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-03-07 ramack Planned ReleaseNone curtiss

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code