finestructure / Arena

A command line tool to create Swift Playground projects with SPM package dependencies
MIT License
675 stars 17 forks source link

'No such module' error #106

Open alvarezGarciaMarcos opened 2 weeks ago

alvarezGarciaMarcos commented 2 weeks ago

Hi,

I recently discovered this tool and I find it really interesting!! I am trying to use Arena with The Composable Architecture but I cannot find a way to import the package correctly. The tool creates the project without issue, I've accepted the macros, cleaned the project, and tried to build again. To no avail.

Although the build returns a 'Build Succeeded', when I try to run it on my Mac (MacBook Pro M1), the project refuses to build and gives a lot of errors (85) such as 'Multiple commands produce...' or 'No such file or directory'. All of this on a newly created project.

I don't really know if this tool is not compatible with the library of if it can be any other problem.

Thank you all in advance.

finestructure commented 2 weeks ago

Thanks for the report, @alvarezGarciaMarcos !

There are some packages that don't play well with compiling them in Playgrounds. Often, it's packages that have C sources or are very large. The Composable Architecture is one of these packages. I know I managed to use it with Arena in the past but I can't get it to work anymore, either.

I suspect it's swift-syntax' long compilation that's tripping things up here. There's unfortunately nothing that can be done about it.

If it's any consolation: using TCA in a playground isn't a great experience even when it works. Because it's heavily leaning on Result Builders and generics, editing the main source file which is then recompiled very frequently quickly leads to the whole thing falling over and requiring you to reopen the playground and "start fresh".

Sorry for the bad news!