Difference between revisions of "Talk:Compilation Without Configuration"

 
(Added comment on bash #! usage)
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
 
Maybe we could generate .ecf file automatically if only the root class is specified. When the user would like to keep the compilation as a project, we keep the .ecf and EIFGENs so that he can play with it later in the normal way.
 
Maybe we could generate .ecf file automatically if only the root class is specified. When the user would like to keep the compilation as a project, we keep the .ecf and EIFGENs so that he can play with it later in the normal way.
  
--[[User:Martins|Martins]] 18:46, 17 November 2006 (PST)
+
'''--[[User:Martins|Martins]] 18:46, 17 November 2006 (PST)'''
  
 
I like the idea and for people who are used to a c compiler (like gcc) will certainly welcome such a feature.
 
I like the idea and for people who are used to a c compiler (like gcc) will certainly welcome such a feature.
Line 37: Line 37:
 
* If no library references are specified, via command line or in an Eiffel source files, EiffelBase library (and precomp) are taken.
 
* If no library references are specified, via command line or in an Eiffel source files, EiffelBase library (and precomp) are taken.
 
* ec lite is a good base that you can start with
 
* ec lite is a good base that you can start with
 +
 +
'''--[[User:Paulb|Paulb]] 20:04, 19 February 2007 (CET)'''
 +
* Something that would should think of doing is have the parser ignore the first line when seeing #! so code files can be downloaded and executed using bash. Whether we should compile and execute or just compiler is something that needs to be discussed.

Latest revision as of 10:04, 19 February 2007

--Patrickr 17:21, 17 November 2006 (PST)

One problem I see is that with this solution we have two ways to compile a system. A beginner starts with one way and then "suddenly" this does not work anymore.

--Tedf 18:21, 17 November 2006 (PST)

Maybe we could generate .ecf file automatically if only the root class is specified. When the user would like to keep the compilation as a project, we keep the .ecf and EIFGENs so that he can play with it later in the normal way.

--Martins 18:46, 17 November 2006 (PST)

I like the idea and for people who are used to a c compiler (like gcc) will certainly welcome such a feature. I personally like to try out some simple stuff and such a feature would be a simplification. Just default usage of the base library would basically be ok with me.

  • instead of taking make or default_create we could also take the first feature after the create clause of the class.
  • By default I would like to keep the EIFGENs and the ecf file and add a symlink to the generated binary. Unless you provide a -clean or something as a command line parameter.
  • The ROOT_CLUSTER should be ./ and recursive.
  • If there's an option to specifiy libraries I would prefer command line arguments over the other solutions because this seems to be the cleanest way for me and it is like C compiler does it. If no library is specified, the base library is taken.
  • I could imagine a file which maps strings to ecf files somewhere in the EiffelStudio installation. So that one could add additional libraries. Rules that make sense for precompiles can be defined.

-- Alexk 15:38, 20 November 2006 (GMT+03:00)

  • An additional option '-root_procedure' or alike can be used to specify a creation procedure different from 'default_create' or 'make'. An indexing clause of the root class can be used to specify the default root creation procedure, but this seems to be an overkill.
  • If an indexing clause is used to figure out the list of the required libraries, it should be applied only when ECF is not used and the data should be read only from the indexing clause of the root class (i.e. without looking into indexing clauses of any other classes). Otherwise we'll run into versioning and conflict resolution problems.
  • I'm not sure whether a library name is sufficient to specify a library (either using an indexing clause or a command-line switch), as some (third-party) examples could use third-party libraries or a library directory can have several ECFs. An alternative would be to specify a path to a ECF using environment variables (like in '$ISE_LIBRARY/library/base/base.ecf').
  • Compiling a system by double-clicking on a class does not seem to be a good idea as a user might be just wanted to open the file and look into the source code. But adding a verb 'Build' or something like that to the list of the verbs associated with the files *.e will do.
  • It makes sense to save "a project file that was created" to compile the system so that it can be reused later for recompilation, for extending the system, etc. But then the compiler has to be careful to avoid overwriting the existing project file as well as to provide the ability to create a new or to use an existing ECF file with the same name.

--Paulb 09:59, 20 November 2006 (PST)

  • I think project assertion levels should be allowed to be set via the command line. This could be in the form of flags - /assert:CEILRO - using the initial character of the contract mechanism (O for callers into libraries, or something else.) Look at the eclite compiler target for the use of argument flags using our argument library.
  • I would prefer that -root_class and associated class file specification be abandoned. Allow one or more files to be listed and use and optional /root switch with a value CLASSNAME.routine, where routine is optional. Not specify /root will take the first file listed (or the only one in 99% of cases) and not routine name will take the one from the root class, only if there is one creation routine.
  • Provide a switch to keep project data and remove it by default after a successful compilation.
  • I don't like libraries in an Eiffel source file but I see the need. This I suggest be indexing clause - depends_on: com.eiffel.base, [5.7, [6.0]] where the first value is the library name or path, the second the minimum library version and the second the max library version. Both min and max are optional.
  • Libraries should be able to be referenced from the command line because you might want to compile files that do not have library reference indexing clauses (e.g. content copied from a web page or through testing.)
  • If no library references are specified, via command line or in an Eiffel source files, EiffelBase library (and precomp) are taken.
  • ec lite is a good base that you can start with

--Paulb 20:04, 19 February 2007 (CET)

  • Something that would should think of doing is have the parser ignore the first line when seeing #! so code files can be downloaded and executed using bash. Whether we should compile and execute or just compiler is something that needs to be discussed.