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

single application project generation crashes #40

Closed
aeh opened this issue Mar 18, 2011 · 7 comments
Closed

single application project generation crashes #40

aeh opened this issue Mar 18, 2011 · 7 comments

Comments

@aeh
Copy link

aeh commented Mar 18, 2011

Answering "yes" to the "Is this a single application project" question fails.
The /app/doc directory is being created twice - once in the build_out_skeleton function and again in the build_out_application function which dies with an eexists error.

{"init terminating in do_boot",{function_clause,[{sin_task_gen,is_made,["/app/doc",{error,eexist}]},{sin_task_gen,make_dir,1},{sin_task_gen,build_out_application,4},{sin_task_gen,build_out_applications,1},{sin_task_gen,get_project_information,2},{lists,foldl,3},{sinan,run_task,3},{sinan,do_task,3}]}}

@ericbmerritt
Copy link
Contributor

Can you tell me what version of sinan you are using? (sinan version will tell you). And the platform you are running on?

@aeh
Copy link
Author

aeh commented Mar 21, 2011

sinan version: 0.24.0
Ubuntu 10.04.1

@aeh
Copy link
Author

aeh commented Mar 22, 2011

The problem is that in the case of a single application the AppDir and ProjDir are the same. build_out_skeleton creates the ProjDir/doc/ directory and then the build_out_application attempts to create the same directory under the guise of AppDir/doc/ and fails due to it already existing.

Can be fixed by replacing the doc folder creation in either of the following functions (in sin_task_gen.erl) with...

build_out_skeleton/1
case get_env(single_app_project, Env) of
false -> make_dir(filename:join(ProjDir, "doc"));
true -> noop
end

or build_out_application/4
case get_env(project_dir, Env) of
AppDir -> noop;
_ -> make_dir(filename:join(AppDir, "doc"))
end

@jwilberding
Copy link
Contributor

What is the latest status on this?

@ericbmerritt
Copy link
Contributor

That shouldn't blue up though, with that failure and doesn't in other cases. Aeh, let me look into this and I will get a fix out. At the very least I can remove that problem.

@ericbmerritt
Copy link
Contributor

Ok, this is fixed in my repo. It should be pushed and available in the next day or so

@jwilberding
Copy link
Contributor

Sinan 0.26.1 has been published which fixes this problem.

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

3 participants