slang-i18n / slang

Type-safe i18n for Dart and Flutter
https://pub.dev/packages/slang
MIT License
474 stars 39 forks source link

Slang follows infinite loop of symlinks #142

Closed fzyzcjy closed 1 year ago

fzyzcjy commented 1 year ago

Describe the bug Hi thanks for the translation tool! However it fails to generate code.

To Reproduce

Create a package, say native_camera. Then in the default native_camera/example app package, let the example depend on .. (i.e. the native_camera package).

Then, flutter run on ios device, so symlinks are created.

Then run slang. Will see sth like:

Unhandled exception:
FileSystemException: Directory listing failed, path = '/Users/whatever/path/to/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/example/ios/.symlinks/plugins/native_camera/ios/Images.xcassets/baseline_collections_black_48pt.imageset/baseline_collections_black_48pt_1' (OS Error: File name too long, errno = 63)
#0      _Directory._fillWithDirectoryListing (dart:io-patch/directory_patch.dart:42:24)
#1      _Directory.listSync (dart:io/directory_impl.dart:233:5)
#2      FileUtils.getFilesBreadthFirst (package:slang/builder/utils/file_utils.dart:68:43)
#3      readFileCollection (package:slang/runner/utils.dart:48:23)
<asynchronous suspension>
#4      main (file:///Users/tom/RefCode/slang/slang/bin/slang.dart:94:26)
<asynchronous suspension>

Expected behavior no error

Additional context

Tienisto commented 1 year ago

Please checkout this commit: 45cc0bf6537d38cd19052749ce32f5375c012311 Did it fix the problem?

fzyzcjy commented 1 year ago

Thanks for the fix! I will try that later

fzyzcjy commented 1 year ago

Hi, I wonder when will the next version be released? Thanks. I have many dozens of (internal) packages so hope that I do not need to do package overriding, i.e. not depend on git but on pub

Tienisto commented 1 year ago

Probably tonight (22 UTC).

Is it okay, if I add you as co-maintainer? I think it's good if at least a second person has write and publish access to ensure that the project never dies. I don't expect you to do all the work though as I am still here haha. I have chosen you because you have lots of packages in the flutter ecosystem.

fzyzcjy commented 1 year ago

Is it okay, if I add you as co-maintainer? I think it's good if at least a second person has write and publish access to ensure that the project never dies. I don't expect you to do all the work though as I am still here haha. I have chosen you because you have lots of packages in the flutter ecosystem.

Thank you for trusting in me! I can guarantee the package compiles and is compatible with latest Flutter in the future, since I am personally using it in my own project; but (as you already know) I may not have enough time to add new features or fix many bugs, given that I already need to maintain my open source libs and my internal work. slang is a helpful package!

Tienisto commented 1 year ago

No worries! You don't need to do anything (You can also unwatch the github repo).

I will do all the work as long as I am able to do so. In a rare accident, you will be able to merge PRs and publish so we avoid a dio debacle.

fzyzcjy commented 1 year ago

I see, and hope no accident happen forever!

(I will watch the repo, and will review PRs / reply to issues when having a bit of time)

fzyzcjy commented 1 year ago

This bug seems to be solved, thanks :)