Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Alexander Doroshko 
Subsystem
Flex Support 
Affected versions
Fixed in
Fixed in build
Next build 
Build
9684
Fixed in build
10057
Severity
0
  • Submitted by   Slawek Garwol
    12 months ago (27 Jan 2009 23:22)
  • Updated by   root
    3 weeks ago (17 Jan 2010 20:11)
  • Jira: IDEA-47637
    (history, comments)

IDEA-47637

Problem with multi-source setup

I have maven-like project with separated source trees for classes and resources
src/main/flex
src/main/resources

At resources tree I have jpg which I try to use in class. I got compilation error:
Error:(3,0): unable to resolve '/assets/images/splash.jpg' for transcoding
Error:(3,0): unable to transcode /assets/images/splash.jpg

FlexBuilder works with that configuration.See attached sample project - FlexBuilder and Idea

Issue was resolved
Comments (13)
 
History (1)
 
Links
 
Alexander Doroshko
  Alexander Doroshko
28 Jan 2009 19:57
(12 months ago)
#permalink
Do you know any way to compile this project using command line 'compc' tool? I haven't found any yet...
Slawek Garwol
  Slawek Garwol
28 Jan 2009 23:04
(12 months ago)
#permalink
Unfortunately me either.

But flex-mojos works with that configuration. See attached pom.xml

I didn't analyze that deeply but I think trick is in LibraryMojo.java (line 237?)
builder = new flex2.tools.oem.Library;
builder..addArchiveFile(resource)
Alexander Doroshko
  Alexander Doroshko
29 Jan 2009 13:07
(12 months ago)
#permalink
Thе issue is not reproducible with Flex 4.0.0 SDK nigtly build (I tried build 4728),
so the cause of this issue seems to be Flex Compiler's bug.
Alexander Doroshko
  Alexander Doroshko
12 Feb 2009 14:00
(11 months ago)
#permalink
Special patch for fcsh tool added that solves problems with multiple source roots in case of Flex 3 SDK.
Vladimir Krivosheev
  Vladimir Krivosheev
27 Feb 2009 12:39
(11 months ago)
#permalink
not resolved. first make: ok, second make: unresolved (3 libs, 2 modules and 1 application). Flex SDK 5082 gumbo. Flex Compiler's bug... I will try research problem or send test project.
Vladimir Krivosheev
  Vladimir Krivosheev
27 Feb 2009 14:05
(11 months ago)
#permalink
in case of Flex 3 SDK

and Flex 4 SDK...

develar:~ develar$ cd workspace/XpressPages
develar:XpressPages develar$ ls
backend client pom.xml xpressPages.iml
develar:XpressPages develar$ fcsh
Adobe Flex Compiler SHell (fcsh)
Version 4.0.0 build 5082
Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved.

(fcsh) mxmlc -load-config=client/editorSkins/twp/target/skins/twp-1.0-SNAPSHOT-config-report.xml
fcsh: Assigned 1 as the compile target id
Loading configuration file /Users/develar/workspace/XpressPages/client/editorSkins/twp/target/skins/twp-1.0-SNAPSHOT-config-report.xml
/Users/develar/workspace/XpressPages/client/editorSkins/twp/target/skins/twp-1.0-SNAPSHOT.swf (24959 bytes)
(fcsh) compc -load-config=client/navigation/target/navigation-1.0-SNAPSHOT-config-report.xml
fcsh: Assigned 2 as the compile target id
Loading configuration file /Users/develar/workspace/XpressPages/client/navigation/target/navigation-1.0-SNAPSHOT-config-report.xml
/Users/develar/workspace/XpressPages/client/navigation/target/navigation-1.0-SNAPSHOT.swc (10309 bytes)
(fcsh) mxmlc -load-config=client/userSkins/navigationSkins/target/skins/navigationSkins-1.0-SNAPSHOT-config-report.xml
fcsh: Assigned 3 as the compile target id
Loading configuration file /Users/develar/workspace/XpressPages/client/userSkins/navigationSkins/target/skins/navigationSkins-1.0-SNAPSHOT-config-report.xml
/Users/develar/workspace/XpressPages/client/userSkins/navigationSkins/target/skins/navigationSkins-1.0-SNAPSHOT.swf (33271 bytes)
(fcsh) compc -load-config=client/commonLibrary/flexLibrary/target/flexLibrary-1.0-SNAPSHOT-config-report.xml
fcsh: Assigned 4 as the compile target id
Loading configuration file /Users/develar/workspace/XpressPages/client/commonLibrary/flexLibrary/target/flexLibrary-1.0-SNAPSHOT-config-report.xml
/Users/develar/workspace/XpressPages/client/commonLibrary/flexLibrary/target/flexLibrary-1.0-SNAPSHOT.swc (18288 bytes)
(fcsh) compc -load-config=client/commonLibrary/ribbon/target/ribbon-1.0-SNAPSHOT-config-report.xml
fcsh: Assigned 5 as the compile target id
Loading configuration file /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/target/ribbon-1.0-SNAPSHOT-config-report.xml
/Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/target/ribbon-1.0-SNAPSHOT.swc (19021 bytes)
(fcsh) compc -load-config=client/model/target/model-1.0-SNAPSHOT-config-report.xml
fcsh: Assigned 6 as the compile target id
Loading configuration file /Users/develar/workspace/XpressPages/client/model/target/model-1.0-SNAPSHOT-config-report.xml
/Users/develar/workspace/XpressPages/client/model/target/model-1.0-SNAPSHOT.swc (4547 bytes)
(fcsh) mxmlc -load-config=client/editor/target/editor-3.0-SNAPSHOT-config-report.xml
fcsh: Assigned 7 as the compile target id
Loading configuration file /Users/develar/workspace/XpressPages/client/editor/target/editor-3.0-SNAPSHOT-config-report.xml
/Users/develar/workspace/XpressPages/client/editor/target/editor-3.0-SNAPSHOT.swf (244062 bytes)
(fcsh) compile 1
Loading configuration file /Users/develar/workspace/XpressPages/client/editorSkins/twp/target/skins/twp-1.0-SNAPSHOT-config-report.xml
Nothing has changed since the last compile. Skip...
/Users/develar/workspace/XpressPages/client/editorSkins/twp/target/skins/twp-1.0-SNAPSHOT.swf (24960 bytes)
(fcsh) compile 2
Loading configuration file /Users/develar/workspace/XpressPages/client/navigation/target/navigation-1.0-SNAPSHOT-config-report.xml
Nothing has changed since the last compile. Skip...
/Users/develar/workspace/XpressPages/client/navigation/target/navigation-1.0-SNAPSHOT.swc (10304 bytes)
(fcsh) compile 3
Loading configuration file /Users/develar/workspace/XpressPages/client/userSkins/navigationSkins/target/skins/navigationSkins-1.0-SNAPSHOT-config-report.xml
Detected configuration changes. Recompile...
Recompile: /Users/develar/workspace/XpressPages/client/userSkins/navigationSkins/src/main/flex/com/thewebproduction/xpressPages/skins/navigationSkins/NavigationButtonSkin.mxml
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/userSkins/navigationSkins/src/main/flex/com/thewebproduction/xpressPages/skins/navigationSkins/NavigationContainerSkin.mxml
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/userSkins/navigationSkins/src/main/flex/navigationSkins.css
Reason: Forced recompilation.
Files changed: 0 Files affected: 3
/Users/develar/workspace/XpressPages/client/userSkins/navigationSkins/target/skins/navigationSkins-1.0-SNAPSHOT.swf (33271 bytes)
(fcsh) compile 4
Loading configuration file /Users/develar/workspace/XpressPages/client/commonLibrary/flexLibrary/target/flexLibrary-1.0-SNAPSHOT-config-report.xml
Nothing has changed since the last compile. Skip...
/Users/develar/workspace/XpressPages/client/commonLibrary/flexLibrary/target/flexLibrary-1.0-SNAPSHOT.swc (18288 bytes)
(fcsh) compile 5
Loading configuration file /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/target/ribbon-1.0-SNAPSHOT-config-report.xml
Detected configuration changes. Recompile...
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/skins/ApplicationTitleBarSkin.mxml
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/skins/StatusBarSkin.mxml
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/components/ApplicationTitleBar.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/ribbon/ApplicationButton.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/ribbon/RibbonBox.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/ribbon/Tab.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/ribbon/Ribbon.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/ribbon/Tabs.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/skins/StatusBarSideSkin.mxml
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/ribbon/Group.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/components/StatusBar.as
Reason: Forced recompilation.
Recompile: /Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/ribbon/skins/TabSkin.as
Reason: Forced recompilation.
Files changed: 0 Files affected: 12
/Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/skins/ApplicationTitleBarSkin.mxml: Error: unable to resolve '/applicationTitleBar/background.png' for transcoding

/Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/skins/ApplicationTitleBarSkin.mxml: Error: Unable to transcode /applicationTitleBar/background.png.

/Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/skins/StatusBarSkin.mxml: Error: unable to resolve '/statusBar/sideDivider.png' for transcoding

/Users/develar/workspace/XpressPages/client/commonLibrary/ribbon/src/main/flex/com/thewebproduction/fluent/skins/StatusBarSkin.mxml: Error: Unable to transcode /statusBar/sideDivider.png.

(fcsh)
Vladimir Krivosheev
  Vladimir Krivosheev
27 Feb 2009 16:07
(11 months ago)
#permalink
Александр, спасибо вам за патч, он работоспособен и для 4 версии. Только поправить 5102 версию fcsh надо совсем чуть-чуть, одна строчка.

@@ -454,6 +457,7 @@
benchmark.stopTime(Benchmark.PRECOMPILE, false);
}

+ ThreadLocalToolkit.getPathResolver().addSinglePathResolver(new SourcePathResolver(s.sourcePath));
List<CompilationUnit> units = CompilerAPI.compile(s.fileSpec, s.sourceList, s.classes.values(),
s.sourcePath, s.resources, s.bundlePath, swcContext,
symbolTable, configuration, compilers,
@@ -1350,4 +1354,28 @@
super();
}
}

Я удалил idea-fcsh-fix.jar (так Fcsh в нем переопределял мой) и собрал свой. Замечу, что mxmlc работает отлично и без патча (у меня есть модуль swf который использует embed так же, как и эта библиотека swc).
Будет отлично, если вы также будете исправлять проблему и для 4 версии SDK.
Alexander Doroshko
  Alexander Doroshko
27 Feb 2009 16:27
(11 months ago)
#permalink
Vladimir, thank you for detailed investigation,
patch will be updated soon
Vladimir Krivosheev
  Vladimir Krivosheev
28 Feb 2009 18:08
(11 months ago)
#permalink
Таки compile_mxmlc тоже надо поправить, этой вот одной строкой. Я не менял модули SWF после первой компиляции, поэтому то сразу и не заметил, что там такая же проблема как и с compile_compc

@@ -454,6 +457,7 @@
benchmark.stopTime(Benchmark.PRECOMPILE, false);
}

+ ThreadLocalToolkit.getPathResolver().addSinglePathResolver(new SourcePathResolver(s.sourcePath));
List<CompilationUnit> units = CompilerAPI.compile(s.fileSpec, s.sourceList, s.classes.values(),
s.sourcePath, s.resources, s.bundlePath, swcContext,
symbolTable, configuration, compilers,
@@ -602,6 +606,7 @@
benchmark.stopTime(Benchmark.PRECOMPILE, false);
}

+ ThreadLocalToolkit.getPathResolver().addSinglePathResolver(new SourcePathResolver(s.sourcePath));
if (projector != null && projector.getName().endsWith("avmplus.exe"))
{
s.units = CompilerAPI.compile(s.fileSpec, s.sourceList, null, s.sourcePath, s.resources, s.bundlePath,
@@ -1350,4 +1355,28 @@
super();
}
}
Alexander Doroshko
  Alexander Doroshko
02 Mar 2009 12:15
(11 months ago)
#permalink
Sure,
to be precise, SourcePathResolver must be set before each invocation of CompilerAPI.compile(...),
in compc() and compile_compc() also
Vladimir Krivosheev
  Vladimir Krivosheev
02 Mar 2009 12:20
(11 months ago)
#permalink
compc — то есть то, что вызывается при первой компиляции, у меня работает. то есть первый make нормально, а вот второй нет. Но хуже точно не будет.
Vladimir Krivosheev
  Vladimir Krivosheev
04 Apr 2009 19:06
(10 months ago)
#permalink
В gumbo 5931 в fcsh внесены изменения, так что теперь компиляция заканчивается ошибкой вызова несуществующего метода. Хм. А вы писали в Adobe issue об этом, дабы они приняли ваш патч? Для себя я решил проблему простым удалением idea-fcsh-fix.jar, так как запатчил fcsh в моей локальной версии fdk и он сразу merge при update.
Alexander Doroshko
  Alexander Doroshko
13 Apr 2009 14:37
(9 months ago)
#permalink
Compilation with Flex SDK 4.0.0.5931+ fixed.
Adobe issues are:
http://bugs.adobe.com/jira/browse/SDK-20569
http://bugs.adobe.com/jira/browse/SDK-20570