Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to have/write system.ecf? #61

Open
ghost opened this issue Oct 15, 2022 · 1 comment
Open

How to have/write system.ecf? #61

ghost opened this issue Oct 15, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 15, 2022

On this document (http://www.gobosoft.com/eiffel/gobo/geant/introduction.html) said:

The following script covers 90% of the cases people use geant for. It inherits the Gobo default tasks and only adds project specific info:

...

This script assumes you have a system.ecf in your system_dir.

The problem is, I don't have a system.ecf. How could I have one? Write manually? Or doing everything on Eiffel Studio, copy the ecf then compile with Gobo? Why it need to be that complicated? Why not simple as gcc test.c -o test or at least a simple makefile? I only want to compile my code to know if it's able to compile or not.

The whole Eiffel language and it ecosystem is the best example of how overengineering and overcomplicated means. I'm not fan of XML. I used to think the XML of Java is the worst. It turned out to be wrong. I should know with all of these XML, XML ontop of XML (ecf is XML and geant is also XML), it must be sucked real hard. I'm a hobbyist only want to learn the language. This is a showstopper. Goodbye.

@ghost ghost mentioned this issue Oct 15, 2022
@Costava
Copy link

Costava commented May 28, 2023

I also did not understand .ecf files or where they are documented.

I got a simple "Hello, World" project working though.

Example .ecf and .e files:

hello.ecf:

<?xml version="1.0" encoding="ISO-8859-1"?>
<system
	xmlns="http://www.eiffel.com/developers/xml/configuration-1-22-0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-22-0 http://www.eiffel.com/developers/xml/configuration-1-22-0.xsd"
	name="hello"
	uuid="9C35A383-0000-4EF8-8784-D6F287B296A4"
>
	<target name="hello">
		<root class="HELLO" feature="make"/>
		<file_rule>
			<exclude>.git</exclude>
		</file_rule>

		<option warning="true">
			<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
		</option>

		<!-- Assumes you set the GOBO environment variable to the path to your gobo repo folder, as per gobo's install instructions. -->
		<library name="free_elks" location="${GOBO}/library/free_elks/library_ge.ecf" readonly="true"/>

		<cluster name="root_cluster" location="./" recursive="false">
			<file_rule>
				<exclude>.git</exclude>
			</file_rule>
		</cluster>
	</target>
</system>

hello.e:

class HELLO

create
	make

feature

	make
		do
			print ("Hello, World%N")
		end

end

Then, you can build the hello executable with gec hello.ecf
Running the executable works as expected:

$ ./hello
Hello, World
$

Tested with Gobo Eiffel v22.01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant