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

findAssets can't find files outside of lib/ folder for aggregate builders #2426

Closed
comigor opened this issue Sep 3, 2019 · 3 comments

Comments

@comigor
Copy link

commented Sep 3, 2019

Hey there!

I'm trying to create an aggregate builder, but it appears that I can't find any asset but pubspec.* outside lib/ folder, regardless of what this test says.

I've created a minimal reproduction repository with the exact same code as the test pointed above, but the output is empty! https://github.com/comigor/repro_aggregate_builder

Is there any other configuration that need to be done to work with $lib$ synthetic input?

@comigor

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

Okay, answering my own question (after taking a look at the code): you need to explicitly whitelist the folders you want to be processed on build.yaml file:

targets:
  $default:
    sources:
      - lib/**
      - data/**

If you don't do this, by default it will consider only some inputs.

@comigor comigor closed this Sep 4, 2019

@jakemac53

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2019

Correct, this is to avoid accidentally including build output directories and hidden directories etc. Fwiw we derived the default include list from the package layout conventions page (to be clear it is fine if you use other directories, it will just require explicit config as you discovered).

@comigor

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

That's good to know! Thanks for pointing this to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.