stanford-ppl / spatial

Spatial: "Specify Parameterized Accelerators Through Inordinately Abstract Language"
https://spatial.stanford.edu
MIT License
271 stars 33 forks source link

Does spatial have to compile everything inside apps/src? #180

Closed hzhang86 closed 5 years ago

hzhang86 commented 5 years ago

This is a weird issue, when I do bin/spatial app1 [other options]. It reports errors found in other source files instead of the app1 definition itself. Why does it have to check all other files inside apps/src folder?

thanks

mattfel1 commented 5 years ago

Hi. This is happening because of sbt. When you run bin/spatial, it is really just a wrapper script that looks for app1 either in test/ or apps/src/ and calls the appropriate sbt command from bash. The sbt command that it calls will compile scala files recursively in the target directory so a syntax error in an unrelated app that sits in the same directory will cause it all to crash.

hzhang86 commented 5 years ago

OK, so for now, I'll just put error-generating files in a different place.

On Fri, Jan 18, 2019 at 2:04 PM mattfel1 notifications@github.com wrote:

Hi. This is happening because of sbt. When you run bin/spatial, it is really just a wrapper script that looks for app1 either in test/ or apps/src/ and calls the appropriate sbt command from bash. The sbt command that it calls will compile scala files recursively in the target directory so a syntax error in an unrelated app that sits in the same directory will cause it all to crash.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stanford-ppl/spatial/issues/180#issuecomment-455702778, or mute the thread https://github.com/notifications/unsubscribe-auth/ALAqweGGJJi9cD6IkQB-YRsW3gF07Nezks5vEkTjgaJpZM4aCIiQ .

-- Best regards

Hui Zhang