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

Wrapper functions for important platforms #20

Closed
jeroen opened this issue Sep 29, 2016 · 10 comments
Closed

Wrapper functions for important platforms #20

jeroen opened this issue Sep 29, 2016 · 10 comments

Comments

@jeroen
Copy link
Member

@jeroen jeroen commented Sep 29, 2016

Maybe it's silly but I would enjoy some wrapper functions for the common platforms which I can list and tab-complete to build:

check_debian_gcc_devel()
check_fedora_clang_devell()
check_linux-x86_64-rocker-gcc-san()

It's more convenient than looking up names in rhub::platforms(). I know the set of platforms is dynamic so you can still use a custom platform with check...

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 29, 2016

Why I understand the desire to do this, it seems like a nightmare to support with the platform changes, etc. How about just giving a string, and then we match to the "nearest" platform automagically? E.g.

check_platform("debian")
check_platform("fedora-clang-devel")
check_platform("san")

I guess it will miss it sometimes, but I think it is easy to implement a version that usually works.

@jeroen
Copy link
Member Author

@jeroen jeroen commented Sep 29, 2016

Meh, I specifically think the ability to tab complete some suggested platforms is really powerful for people that are too lazy to read the docs... Anyway it was just a suggestion, I understand that maintaining hardcoded lists is undesirable.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 29, 2016

OK, tab complete is a good idea, then we can have

check$debian_gcc_devel()
check$fedora()

Etc. and the part after $ would tab complete. THis is slightly better than defining a bunch of functions, especially if you want the granularity of debian_gcc_devel....

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 29, 2016

Also, I think you are right that we'll need an easier interface, because we might have 30-50 images in a year or so.

But I would not do debian_gcc_devel still, only check_linux, check_windows, etc. maybe check_linux_debian etc. as well. Although we are almost at your original suggestion now.....

OK, I'll give it a shot.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 29, 2016

So how about the $ version with tab-completion?

@jeroen
Copy link
Member Author

@jeroen jeroen commented Sep 29, 2016

Give me 1 sec to try something else

@jeroen
Copy link
Member Author

@jeroen jeroen commented Sep 29, 2016

See #21

@jeroen
Copy link
Member Author

@jeroen jeroen commented Sep 29, 2016

Anyway that's just a silly idea. I'm going for a run, ttyl.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 29, 2016

I'll keep this open for check_linux, check_win and check_osx, and then we'll see about the rest.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 29, 2016

I'll actually open another issue for this.

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

Successfully merging a pull request may close this issue.

None yet
2 participants