I just want to optimize for a couple of common cases in order to save me
and maybe other folks some time.  If for some reason I need to compile a
Flash Builder project from the command-line or Ant or Java debugger, I
don't have to remember to set the -output parameter.

I used to get FB projects in JIRA and email and then unpack them and
compile them outside of FB because then I can get the debugger on them
more easily.  All of our examples are set up so you can compile them from
the command line and not have to type the -output parameter.  And if you
make a mistake typing the output folder name, it ends up creating a new
folder with that name.

I'm not sure what you mean by generalizing.  Are you suggesting allowing
folks to add more patterns to the set of folders where the compiler will
chose the parent of the folder pattern?  I'm not sure how that solves the
problem.  Seems like you'd still be surprised if you use "source" or
something that isn't in the default list so a warning would still help,
but if that's what you want to do, seems like it wouldn't hurt.

My 2 cents,
-Alex


On 6/1/17, 9:59 AM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:

>I'm not sure that I understand why you mentioned changing Flash Builder's
>default source path. That seems mostly tangential here.
>
>I'm saying that the compiler shouldn't care whether it's named "src",
>"source", or "whatever-i-want-to-call-it". It should simply default to
>putting "bin" in the parent of that folder. A warning might be a good
>temporary workaround, but generalizing this behavior is significantly
>better, in my opinion.
>
>- Josh
>
>On Thu, Jun 1, 2017 at 9:26 AM, Alex Harui <aha...@adobe.com.invalid>
>wrote:
>
>> I think "src" is for Flash Builder.  I don't know what it would take to
>> get FB to default to something else.  I know I have lots of projects
>>with
>> just a "src" folder.
>>
>> I agree it is confusing.  We could output a warning or error if you
>> haven't specified -output, -js-output and don't have "src" or
>> "src/main/flex" folders.  Something like "Warning: output folder not
>> specified and src or src/main/flex folders not specified.  Output will
>>be
>> in <name of output folder".
>>
>> Would that help eliminate confusion?  That's easy for someone to add to
>> MXMLFlexJSPublisher.java.
>>
>> Thoughts?
>> -Alex
>>
>> On 6/1/17, 8:52 AM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:
>>
>> >I think I had some trouble trying to get -output to accept a directory
>>for
>> >a JS-only project, and that's when I figured out that -js-output
>>exists.
>> >Maybe I was doing something wrong at the time. Or maybe it didn't quite
>> >work properly yet.
>> >
>> >Although, I still think it's confusing to those who don't realize that
>> >"src" and "src/main/flex" get special treatment and then "bin" ends up
>> >somewhere else if they happen to choose a different name for a new
>> >project.
>> >Between me and Santanu, that's two people who had to waste time on
>> >figuring
>> >out why "bin" ended up somewhere we didn't expect. I could live
>>without it
>> >being the current working directory if "bin" would simply go into the
>> >parent directory of the directory containing the main class by default,
>> >regardless of whether it's named "src" or not. If "src/main/flex" is
>>the
>> >only special case, that's better, in my opinion.
>> >
>> >- Josh
>> >
>> >On Thu, Jun 1, 2017 at 8:16 AM, Alex Harui <aha...@adobe.com.invalid>
>> >wrote:
>> >
>> >> And if you just use -output and not -js-output the bin folder will be
>> >> where you specified -output, and if you specify
>> >> -output=somefolder\somefile.swf the output will be in somefolder\bin.
>> >>
>> >> The logic is trying to say:
>> >> 1) If you specify -output as a SWF, we will use the parent folder of
>>the
>> >> SWF
>> >> 2) If you specify -output as a folder, we will use that folder
>> >> 3) If you specify -js-output, we will use that regardless of what you
>> >>used
>> >> for -output
>> >> 4) If you didn't specify -output or -js-output then
>> >>   A) If you have a src folder or src/main/flex folder we will use the
>> >> parent of src
>> >>   B) Otherwise we will use the parent folder of the main source file.
>> >>
>> >> I don't agree that CWD is the right default.  For me, I've always
>>had a
>> >> folder full of test cases and am not always changing folders.  I
>>think
>> >>the
>> >> regular Flex MXMLC worked this way as well so I didn't want to change
>> >>that
>> >> pattern.
>> >>
>> >> 4A is just a convenience for those who follow certain common
>>patterns so
>> >> they don't have to do as much typing on the command line.  It might
>>also
>> >> "do the right thing" for Flash Builder users.  I think Maven always
>> >> specifies the output folder.
>> >>
>> >> My 2 cents,
>> >> -Alex
>> >>
>> >> On 6/1/17, 7:48 AM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:
>> >>
>> >> >In that case, the SWF will use the -output option:
>> >> >
>> >> >mxmlc -output=path/to/MyProject.swf -js-output=. source/MyProject.as
>> >> >
>> >> >- Josh
>> >> >
>> >> >On Thu, Jun 1, 2017 at 7:30 AM, piotrz <piotrzarzyck...@gmail.com>
>> >>wrote:
>> >> >
>> >> >> Ahh..Ok now it is clear. What about if we have
>> >> >> -compiler.targets=JSFLEX,SWF -
>> >> >> So -js-output will be also the place where SWF file will landed?
>>- If
>> >> >>yes
>> >> >> in
>> >> >> that case this param could have different name.
>> >> >>
>> >> >> Thanks,
>> >> >> Piotr
>> >> >>
>> >> >>
>> >> >>
>> >> >> -----
>> >> >> Apache Flex PMC
>> >> >> piotrzarzyck...@gmail.com
>> >> >> --
>> >> >> View this message in context: http://apache-flex-
>> >> >> development.2333347.n4.nabble.com/FlexJS-Why-FlexJS-
>> >> >> compiler-statically-looks-for-src-folder-tp61991p61997.html
>> >> >> Sent from the Apache Flex Development mailing list archive at
>> >> >>Nabble.com.
>> >> >>
>> >>
>> >>
>>
>>

Reply via email to