[ nice-Bugs-802210 ] custom initialisers lost during partial recompile

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #802210, was opened at 2003-09-08 03:12
Message generated for change (Comment added) made by bonniot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=802210&group_id=12788

Category: None
Group: None
Status: Open
Resolution: Fixed
Priority: 5
Submitted By: Rohan Hart (dr_dee)
Assigned to: Daniel Bonniot (bonniot)
Summary: custom initialisers lost during partial recompile

Initial Comment:
Class initialisers in packages which have not changed,

and are hence not recompiled, are lost when other

packages are compiled.



Nice compiler version 0.9.2 (build 2003.09.02, 21:54:27

UTC)



----

package A;

class A {

    {

      println("init A");

    }

}



package B;

import A;



void main(String[] args) {

  let a = new A();

  println("done!");

}

----



>nicec --jar A.jar B

nice.lang: parsing

A: parsing

B: parsing

A: typechecking

A: generating code

B: typechecking

B: generating code

B: linking

B: writing in archive

A: writing in archive

nice.lang: writing in archive



>$JAVA -jar A.jar 

init A

done!



>touch B/b.nice

>nicec --jar A.jar B

nice.lang: parsing

A: parsing

B: parsing

B: typechecking

B: generating code

B: linking

B: writing in archive

A: writing in archive

nice.lang: writing in archive



>$JAVA -jar A.jar

done!



----------------------------------------------------------------------

>Comment By: Daniel Bonniot (bonniot)
Date: 2003-09-11 07:07

Message:
Logged In: YES 
user_id=88952

I have fixed the printing of these expressions (not commited

yet). However, I think a better solution would be not to

print the initializer in package.nicei, but to preserve the

bytecode generated one.



Is this holding you back?

----------------------------------------------------------------------

Comment By: Rohan Hart (dr_dee)
Date: 2003-09-10 07:29

Message:
Logged In: YES 
user_id=774102

change A/a.nice into



package A;

class A {

    {

      let b = true;

      if (b) {

        println("init A");

      }

    }

}



and the generated package.nicei includes (with my

annotations as to the errors)



class A {

{

{

if(b)  // compiler throws 'b is not declared' after error

below is fixed

{

println("init A");

}



else

()  // compiler throws 'Encountered ")".' here --> change to {}

endif;

}

}

}



----------------------------------------------------------------------

Comment By: Daniel Bonniot (bonniot)
Date: 2003-09-08 20:49

Message:
Logged In: YES 
user_id=88952

This bug has been fixed. The next release of the compiler will

include this correction. In the mean time, I encourage you try

the development version. It contains a version of the compiler

that fixes the bug. Please try it and reopen the bug-report if

you find any problem with it.



To know how to get an install the development version of the

compiler that fixes this bug, please read

http://nice.sourceforge.net/cgi-bin/twiki/view/Dev/DevelopmentVersion



Thanks again for your help by submiting this bug report. 



Daniel Bonniot



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=802210&group_id=12788


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.