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

crystal build without spepecified program files #3538

Closed
wants to merge 1 commit into from
Closed

crystal build without spepecified program files #3538

wants to merge 1 commit into from

Conversation

tbrand
Copy link

@tbrand tbrand commented Nov 13, 2016

Hi all,

Currently, crystal build is not working without specified program files but just shows the usage.
But given the fact that almost all projects are created by crystal init, I think crystal build should work in that case.
I added a feature to the crystal command that crystal build works in a root directory of the project created by crystal init.
When user doesn't run crystal build in a root directory of a crystal project, it works as the same as before.

Best

@ysbaddaden
Copy link
Contributor

IMHO this is out of scope for crystal. Having a command work in one context (unrelated to the command) but not in another is confusing.

This would fit better into Shards. See crystal-lang/shards#110

@tbrand
Copy link
Author

tbrand commented Nov 13, 2016

Hi ysbaddaden,

Thanks for your comment and suggestion!
Considering the both of features of crystal and shards command, the feature I added is much fit for crystal not shards
Because shards init doesn't construct whole project but only creates a shard.yml.
On the other hand, crystal init does it and ensures that project contains shard.yml.
So I think crystal build building a shards project by default is quite natural.
Any comments are welcome :)

Best

@bcardiff
Copy link
Member

Some apps will be made up of many executables. So you will need to be explicit on those. Having this kind of default might hide the users how simple is to choose an entry point.

Also some tools need to know which is the entry point. If there is no introspection for this, the logic will end up duplicate.

I would feel more comfortable with a solution described in the shards issue linked before.

I like the default, but i would make it work due to default values in a shard.yml or some other build artifact rather than the code for the reasons i describe here.

@tbrand
Copy link
Author

tbrand commented Nov 14, 2016

Hi bcardiff

Hmm, OK.
I will work on it with shards :)
Thanks for your comments!

@tbrand tbrand closed this Nov 14, 2016
@tbrand tbrand deleted the feature-build-cmd branch November 14, 2016 04:57
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

Successfully merging this pull request may close these issues.

3 participants