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

Cannot generate from assets with package in its path #278

Closed
Aqluse opened this issue Aug 9, 2022 · 2 comments
Closed

Cannot generate from assets with package in its path #278

Aqluse opened this issue Aug 9, 2022 · 2 comments

Comments

@Aqluse
Copy link

Aqluse commented Aug 9, 2022

As stated, it seems just like ignoring it. So I have looked through related code and found a very interesting lines that I suspect cause that (without debugging it).

Looks like a function _getAssetRelativePathList (used in every variant of case style) has only two conditions to add paths from pubspec assets, I think both of these conditions ending up with 'false' and function silently drops such paths (like it's a good way to handle this, which is surely not).
Conditions are:
FileSystemEntity.isDirectorySync / FileSystemEntity.isFileSync

List<String> _getAssetRelativePathList(

@Aqluse
Copy link
Author

Aqluse commented Aug 10, 2022

I was right about this, I have put these lines:

stdout.writeln('Assets:');
  stdout.writeln(assets.length);
  stdout.writeln(assets);
  stdout.writeln('Relativized asset paths:');
  stdout.writeln(assetRelativePathList.length);
  stdout.writeln(assetRelativePathList);

which gives me an output:

Assets:
5
[packages/.../assets/resources/snackbar/action-close.svg, packages/.../assets/resources/snackbar/action-redirect.svg, packages/.../assets/resources/snackbar/status-info.svg, packages/.../assets/resources/snackbar/status-success.svg, packages/.../assets/resources/snackbar/status-warning.svg]
Relativized asset paths:
0
[]

@AlexV525
Copy link
Member

AlexV525 commented Mar 7, 2024

@Aqluse Could you verify if #471 resolves the issue?

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

No branches or pull requests

2 participants