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

support alternative files in submodules #190

Closed
wants to merge 1 commit into from

Conversation

tox2ik
Copy link

@tox2ik tox2ik commented Dec 31, 2019

What does this PR do?

I would like to support alt-files in submodules.

What issues does this PR fix or reference?

This is related to reported feature request: #78

[A list of related issues / pull requests.]
#78

Previous Behavior

Alt files ending with e.g. ##os.solaris are ignored in submodules.

New Behavior

Alt files are from submodules generate symlinks

$ y submodule
 79ebb378bac037d0a515ce926e98bf8eb16ac35f vim (heads/master)
$ y alt
Linking /home/jaroslav/.Profile/Xdefaults/Xdefaults.fonts##h.balmora to /home/jaroslav/.Profile/Xdefaults/Xdefaults.fonts
Linking /home/jaroslav/.Profile/vim/autoload/fonts##h.balmora to /home/jaroslav/.Profile/vim/autoload/fonts

Have tests been written for this change?

No

Have these commits been signed with GnuPG?

No


Please review yadm's Contributing Guide for best practices.

@TheLocehiliosan TheLocehiliosan changed the base branch from master to develop December 31, 2019 17:32
@tox2ik
Copy link
Author

tox2ik commented Mar 18, 2020

SC2016: Expressions don't expand in single quotes, use double quotes for that.

shellcheck is too clever for itself. I kinda hate that tool. I am using single quotes here to -not- expand the expression passed to git foreach. a lot of what shellcheck does it is style and opinion based. In this particular case it is flat out wrong.

I guess I can write a test to verify that new files are put in place as expected, also when switching environments.

@TheLocehiliosan
Copy link
Member

@tox2ik - Just so you are aware, this PR wasn't being ignored because of the shellcheck failure. I've merely have very little time to devote to yadm over the past few months. I think more time should be freeing up soon....

@tox2ik
Copy link
Author

tox2ik commented May 21, 2020

Looking at your test configuration now. I'm sure you have reasons, by my-my does it feel over-engineered. It's ok that you may want to run the tests in a container (controlled environment), but forcing everyone to run them in a container is overkill. When the tools advance, and dependencies progress, your testbed (yadm/testbed:2020-01-20) will become obsolete. And in effect, the test will only verify some "ancient" environment that no one cares about (imagine you cannot maintain project for 3+ years)

Not sure I have a point other than I'd like to run the tests natively, or at least understand the python setup. Given a "bash perspective", the current setup (Makefile; test) does everythig to prevent that.

Also, testing bash with python feels contrived. I'll do my best to comply and understand what's going on, but you are forsing me to - instead of writing a bash script to verify funtionality, I now need to learn a whole new setup that I have never heard of before.

The whole docker-compose aspect of image: yadm/testbed:2020-01-20, seems to be completely outside of the project. Where tf are the instructions to build that image? Further, make testenv seems somewhat relevant, but I still dont understand how to run the tests form that. Either I am
a complete moron, or you need to explain wtf is going on. At least hint at some tutorial that uses this test-environment setup in the readme.

I appreciate your time and this project.

@erijo
Copy link
Collaborator

erijo commented Dec 30, 2020

docker-compose is no longer used to run the tests (on the develop branch). They are instead run using just docker. The Dockerfile used to create the test image is in the test directory. You can build the image yourself with make image.

To run all tests just do make test. To run a single test you can do e.g. make test testargs=test/test_init.py.

As for shellcheck you can ignore specific lines if you want.

@github-actions github-actions bot added the stale label Jan 8, 2022
@github-actions github-actions bot closed this Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants