-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Spike/altered loading strategy #1349
Conversation
I've coded this in two slightly different ways in different SHA's. Will remove the one / both we like/dislike |
Nice work! WRT to your questions:
|
No. We have nothing comparable in Java. |
Is there a reason for keeping |
I think that whilst this will be in a new major cut, there was no notice of deprecations beforehand, and this is quite a big change to the autoloader. I would rather keep the default as is and add a new config for v4 and then for v5 alter / remove / switch the default |
Looks good to me @luke-hill and I second @jaysonesmith's suggestion of a blog post when we do the release. Just make sure the changelog is up to date when you merge so you/we know what to build the blog post around. |
fa5a1e8
to
af0417b
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
As an update the following is required A rebase (10min) |
@luke-hill how comes we're using the global |
Couple of reasons
|
…le parameter accordingly
Because all of the specs run inside a single ruby process/thread, the 'caching' state of load and require is done per test In the previous iteration, we ran the caching test once(require) and the non-caching test twice(load) Now we run the caching test twice, we need to ensure the names aren't identical to prevent test-leakage or pollution across tests
… which have been overwritten mid-thread To fix this we need to ensure each file is uniquely named (Or keep this config setting on.
Code wise this is all good now. Issues outstanding
cc/ @mattwynne / @aslakhellesoy |
I'm going to merge this in now. And as/when we cut a version or release my blog post, we can quickly amend the changelog link |
Summary
Provide a way for cucumber to only load files once.
Details
Using a config switch, decide on whether cucumber should recurse through files potentially
n
times, or just once only.Motivation and Context
This fixes an old problem here: #1043 - Where the user had procedural code which was being instantiated twice. A user should be able to specify the load order of a file, and "not" have the file loaded twice.
How Has This Been Tested?
Unit Tests have been added in the appropriate file.
Screenshots (if appropriate):
Types of changes
Checklist:
Outstanding questions FYI: @mattwynne / @roberts1000