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

Test files should not be pulled into builds #18

Closed
mduvergey opened this issue May 18, 2020 · 16 comments
Closed

Test files should not be pulled into builds #18

mduvergey opened this issue May 18, 2020 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@mduvergey
Copy link

Hi,

Installing NSubstitute with Unity package manager is required in order for Fluid Behavior Tree to compile properly.

Installation guidelines should mention that.

Best regards

@ashblue
Copy link
Owner

ashblue commented May 27, 2020

This should only be required if you're trying to run the test suite (at that point I highly suggest cloning down this repo instead) or you manually pulled the files into your project. How did you install the package? Hopefully you used the guide here?

https://github.com/ashblue/fluid-behavior-tree#installing

@ashblue ashblue added the question Further information is requested label May 27, 2020
@mduvergey
Copy link
Author

I installed the package following guide instructions, adding scopedRegistries entry in file manifest.json then using Unity Package Manager to get the package.

@ashblue
Copy link
Owner

ashblue commented May 28, 2020

Weird, haven't seen this before. Wondering if you somehow included the test files with your asmdef files. I'll try to reproduce on my end this weekend. What's your Unity version?

@ashblue ashblue added investigating Need more information before determining action and removed question Further information is requested labels May 28, 2020
@mduvergey
Copy link
Author

It's 2018.4.22f1.

@ashblue
Copy link
Owner

ashblue commented May 28, 2020

Uh oh, I think this package is marked as 2019 required at least. Big changes to the package manager since then. I'll update the install docs if this is the case.

@ashblue ashblue self-assigned this May 29, 2020
@ashblue
Copy link
Owner

ashblue commented May 29, 2020

Okay min is 2018.1, will investigate and update more here this weekend https://github.com/ashblue/fluid-behavior-tree/blob/master/Assets/FluidBehaviorTree/package.json#L6

@ashblue
Copy link
Owner

ashblue commented May 30, 2020

A fresh install of 2019.3.15f1 with the library works fine. Proceeding to check 2018.4.22f1 to see if I can reproduce.

@ashblue
Copy link
Owner

ashblue commented May 30, 2020

@mduvergey I tried your specific version and I can't reproduce this issue. Can you post the specific error message? I think it may be something specific to your setup. Are you using .asmdef files? If so don't include any of the test ones.

@ashblue ashblue added can't reproduce Unable to reproduce this user's specific issue investigating Need more information before determining action and removed investigating Need more information before determining action labels May 30, 2020
@mduvergey
Copy link
Author

Here is the error message:
Library/PackageCache/[email protected]/Tests/Editor/BehaviorTrees/BehaviorTreeTest.cs(6,7): error CS0246: The type or namespace name 'NSubstitute' could not be found (are you missing a using directive or an assembly reference?)

I'm not using .asmdef files.

One interesting thing I just found out is that the problem occurs with version 2.2.1 of Fluid BT but not with version 2.2.0.

@ashblue
Copy link
Owner

ashblue commented May 31, 2020

That gives me an idea, going to try fiddling with some settings.

@ashblue
Copy link
Owner

ashblue commented May 31, 2020

Yep, able to confirm, I'll try to get this patched asap.

@ashblue
Copy link
Owner

ashblue commented May 31, 2020

I found the issue. Looks like the editor test file was mangled on Unity upgrade. v2.2.0...v2.2.1#diff-0fe051f82fee31b8860f0c4d27fce39a

ashblue added a commit that referenced this issue May 31, 2020
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
@ashblue ashblue added bug Something isn't working and removed can't reproduce Unable to reproduce this user's specific issue labels May 31, 2020
ashblue added a commit that referenced this issue May 31, 2020
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
@ashblue ashblue changed the title Installation guidelines should include NSubstitute Test files should not be pulled into builds May 31, 2020
@ashblue
Copy link
Owner

ashblue commented May 31, 2020

Heyo, I got a fix into the nightly build which seems to be working fine. If you have some time you can try it out here (no pressure though).

https://github.com/ashblue/fluid-behavior-tree#nightly-builds

This will go out in the next release. I need to fix another bug with composites. Once that's done the two should go out together in a patch.

PS Thank you super duper much for your patience with reporting this. Will add you as a contributor for the stellar bug report.

Repository owner deleted a comment from allcontributors bot May 31, 2020
@ashblue
Copy link
Owner

ashblue commented May 31, 2020

@all-contributors please add mduvergey for bug

@allcontributors
Copy link
Contributor

@ashblue

I've put up a pull request to add @mduvergey! 🎉

ashblue added a commit that referenced this issue May 31, 2020
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
@mduvergey
Copy link
Author

Hi,
I can confirm that your fix works.
Thanks!

ashblue added a commit that referenced this issue Jun 1, 2020
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Jun 1, 2020
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
@ashblue ashblue closed this as completed Jun 4, 2020
ashblue pushed a commit that referenced this issue Jun 4, 2020
## [2.2.2](v2.2.1...v2.2.2) (2020-06-04)

### Bug Fixes

* **dependencies:** nsubstitute no longer required ([a171e85](a171e85)), closes [#18](#18)
* **repeaters:** now handle composites and task hooks as expected ([3d8bcf6](3d8bcf6))
ashblue added a commit that referenced this issue Mar 24, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Mar 24, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Mar 24, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Mar 27, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Mar 27, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Apr 2, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Apr 4, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Apr 4, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
ashblue added a commit that referenced this issue Apr 7, 2021
Unity auto upgrade overwrote a sensitive asmdef file that started pulling in test files. This patch
restores things back to the expected functionality.

#18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants