除非我先删除文件,否则 Compc(Actionscript 库编译器)不会失败?

发布于 2024-07-13 00:06:22 字数 1353 浏览 7 评论 0原文

场景如下:我在源目录上运行 compc,以在进行一些更改后重新编译已经存在的库,并成功完成。 然后我删除该库(.swc 文件)并重新编译,这会导致抛出许多错误。

在此期间没有任何变化 - 显然这应该要么两次成功,要么两次失败。

libs/pv3ddebug $ compc -library-path+=.. -source-path=./src -compiler.optimize -include-sources+=./src -output ../pv3ddebug.swc
Loading configuration file /Users/bill/flex_sdk_3/frameworks/flex-config.xml
/Users/bill/lg/vision/libs/pv3ddebug.swc (152944 bytes)

/libs/pv3ddebug $ rm ../pv3ddebug.swc 

/libs/pv3ddebug $ compc -library-path+=.. -source-path=./src -compiler.optimize -include-sources+=./src -output ../pv3ddebug.swc
Loading configuration file /Users/bill/flex_sdk_3/frameworks/flex-config.xml
/Users/bill/lg/vision/libs/pv3ddebug/src/com/phenomblue/pv3ddebug/PV3DDebug.as(45): col: 34 Error: Type was not found or was not a compile-time constant: AdvancedView.

                public function PV3DDebug(view:AdvancedView)
                                               ^
... more errors follow

我想我已经找到了发生错误的原因,并且可以纠正它们,但我对第一次编译没有失败感到不安。

我有一个理论:

  1. pv3ddebug 所依赖的库 A 是正确的
  2. pv3ddebug 已成功编译(并且正确)
  3. 库 A 进入了无法使用 pv3ddebug 进行编译的状态
  4. pv3ddebug 已成功编译,但不正确,因为 compc 没有请注意,A 已更新为失败状态,
  5. 删除了 pv3ddebug,然后重新编译导致 compc 尝试使用新 A 进行编译,因此编译失败。

我的问题是:第 4 步是一个错误吗? 这是我应该预料到的缓存行为,还是可以通过编译器开关进行更改? 是否有什么事情是我的理论无法解释的?

Here's the scenario: I run compc on a source directory to recompile an already existing library after some changes, which completes successfully. Then I remove the library (the .swc file) and re-compile, which causes many errors to be thrown.

Nothing changed in the interim - clearly this should have either succeeded both times or failed both times.

libs/pv3ddebug $ compc -library-path+=.. -source-path=./src -compiler.optimize -include-sources+=./src -output ../pv3ddebug.swc
Loading configuration file /Users/bill/flex_sdk_3/frameworks/flex-config.xml
/Users/bill/lg/vision/libs/pv3ddebug.swc (152944 bytes)

/libs/pv3ddebug $ rm ../pv3ddebug.swc 

/libs/pv3ddebug $ compc -library-path+=.. -source-path=./src -compiler.optimize -include-sources+=./src -output ../pv3ddebug.swc
Loading configuration file /Users/bill/flex_sdk_3/frameworks/flex-config.xml
/Users/bill/lg/vision/libs/pv3ddebug/src/com/phenomblue/pv3ddebug/PV3DDebug.as(45): col: 34 Error: Type was not found or was not a compile-time constant: AdvancedView.

                public function PV3DDebug(view:AdvancedView)
                                               ^
... more errors follow

I think I've found out why the errors are happening, and can correct them, but I'm disturbed that the first compile didn't fail.

I have a theory:

  1. Library A, which pv3ddebug depends on, was correct
  2. pv3ddebug was compiled successfully (and it correctly)
  3. Library A was brought into a state that would fail to compile with pv3ddebug
  4. pv3ddebug was compiled successfully, incorrectly, because compc didn't notice that A was updated to a failing state
  5. deleting pv3ddebug and then recompiling caused compc to try and compile with the new A, and so the compilation failed.

My questions to you: is step 4 a bug? Is this caching behavior I should have expected, or can change with a compiler switch? Is there something going on that my theory doesn't explain?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

街道布景 2024-07-20 00:06:22

您可以尝试-incremental = false。 这应该是命令行编译器的默认设置,但您所描述的听起来像是已启用。

You could try -incremental=false. This is supposed to be the default for the command line compiler, but what you're describing sounds like it's enabled.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文