Flex 3 Referencing old files, will not compile updates to code - actionscript-3

I am making some changes to a Flex 3 project and have run into trouble. I am using Flex Builder 3, working on a PC. Everything was working as expected throughout my first day of code updates, but on day 2 Flex started behaving badly.
The problem started when I removed a component, and then got an error that it couldn't find the specified component in some accompanying AS3 code. No problem, I updated the reference so it wouldn't look for the old missing component (a form item). When I compiled the project in debugger to check my work, it failed when it got to that part, and gave an error that it couldn't find the component I'd removed. However, my code had fixed the problem, and the error was referencing a line of code that wasn't there any more. I proceeded to change the file around greatly, and even resorted to creating a new file, changing the name of it, and then recompiling it. I did a clean compile as well, rebooted my machine, restarted Flex, but every time it gives an error referencing the bit of code that isn't even there any more. It's as if it's loading a cached project each time (both in debugger and run mode).
For reference, here's the error I'm getting:
ReferenceError: Error #1069: Property Winter Cost not found on views.PopupUsage and there is no default value.
Well, the file "PopupUsage.mxml" doesn't even exist any more and is not referenced in my project at all, but it's still being referenced by Flex when I compile the files. Any ideas? What can I do to make Flex move on and look at my code?
Thanks in advance!

The only time I have encountered this issue is when I've been developing an application that uses another SWC in the project build path. Where I've come undone is not referencing the SWC project in the project properties build path, but only referencing the SWC itself. If you have the SWC project code imported and you're editing it, then you can see this type of behaviour, appearing as though there's a mysterious cached version of your app, where in fact its simply the build path that isn't quite right.
So check your project properties build path for this issue, it sounds obvious, but I've lost count of the amount of times I've quickly imported the code for a library and forgotten to reference it properly in the application I'm using it in!

Related

Stuck with NopCommerce First Changes Not Showing up

Hello everyone and thank you for your time.
I am a developper, I have 1 year experience with C# and 3 with Java, but not with NopCommerce.
I downloaded NopCommerce 4.20 and imported it into my Visual Studio 2019.
Arranged some problems and finally run it and applied a Theme I bought.
But, when trying to start modifying the code, it does not take any effect.
I thought this could have relation with compilation problems (I already saw the Topic for the error on compile 'ClearPluginAssemblies' and 'SaveLocalesFolders'). So the only way to get rid of it was to disable the MSBuild of this little project (which is used to clean duplicated Plugin directories by NopCommerce itself).
I have a bunch of questions:
1. What do I need to do with ClearPluginAssemblies? Configure it so that it doesn't give me more problems anymore when running the WebApp? Or disabling it and deleting manually the Plugin folder, after every compile, but before Starting the Webapp 'Node.Web'?
Exactly, which folder should I delete on this case? (For me it's ok to do it manually, I am starting to touch NopCommerce in order to see wether my uncle Business could work or not).
If 'ClearPluginAssemblies' do not affect to the compilation process... What can I do to start modifying the code ? Changes don't take effect on the Local instance of the Online Shop I am running! (for example, I want to add an element in the product page)
Visual Studio does not Highlight the *.cshtml files, it opens them only with white text, so I think it isn't recognising properly? Do I really compile my changes? They don't show up...
I am doing refresh, clean, compile, all the stuff for webapps, but I can't even start programming...
For 4 hours, I followed the next Topics but I couldn't get to solve it:
https://github.com/nopSolutions/nopCommerce/issues/4116
https://www.nopcommerce.com/boards/topic/71353/420-fails-to-build-clearpluginassembliesproj
https://github.com/nopSolutions/nopCommerce/issues/2728
What I need in the End is Start Modifying the Code and Generating the different Views.
I think I can delete manually Repeated NopCommerce default plugins (but not My theme Plugins), or with a Batch, whatever.
Thank you very much in advance !!

Cannot resolve module 'json'

I'm dealing with a very weird issue. For some reason, since a few days, my application doesn't seem to be loading JSON files anymore inside modules.
The app was created with create-react-app, and has been in development for a while without any issues. I've had a dependency in the project (world-countries) that basically only exports a json file. This dependency is not a recent addition.
So, here's the thing. From one day to another, I get the following error while starting/building the app:
Module not found: Error: Cannot resolve module 'json' in /Users/…
As far as I know, I made no changes that would result in this, and create-react-app's webpack version is still the same.
Requiring a random JSON file in the root of my app goes well, somehow this odd behaviour only seems to apply to json files within node_modules in the app.
Some other points:
By this point, I have reinstalled dependencies and node.js multiple times, checked file permissions, etc. To no avail.
Another dependency that also used a json file internally also had this issue, but I managed to circumvent that.
I've explicitly installed json-loader in case something with webpack got messed up, but this didn't make any difference. In fact, I find it curious that _the missing dependency is "json" and not json-loader.
I have a feeling that this is a weird issue caused by some file limit, as when I run the dev server, I get errors relating to too many open files. My project isn't that big, so this seems weird, and I have a feeling it might have something to do with some npm linked modules I have, but there is no recursion or anything.
I'm still quite perplexed, and have no idea what the issue might be. Any suggestions on how to fix this are very welcome
Some people seemed to have had a related issue regarding importing json files in the past. It wasn't in a dependency but I believe it is related.
I took the time to scaffold a new project, import the world-countries modules and log it, and it was working fine.
I would recommend you to update re-scaffold or update all your dependencies, but most notably react-scripts which is version 0.9.5 for me. My create-react-app-version is also 1.3.0.

Changing one CLJC-file causes full recompile

In a fairly large project I am working on, I have a separate source folder with .CLJC-files that are shared between the frontend (Clojurescript) and backend (Clojure).
I noticed that making a trivial change in a CLJC file (e.g., adding a blankline) causes all or most of the CLJC + Clojurescript files to be rebuilt (as listed by the compiler with :verbose to true). This causes a delay of about 45 seconds on my machine. Strange thing is that this even happens when the CLJC does not contain any functions, and is not require'd by any other CLJS/CLJC file...
Does anybody know what could cause this behaviour? My project file is quite standard, and I use the latest versions (CLJS 1.9.293, lein-cljsbuild 1.1.5 or even 1.1.6-SNAPSHOT).
Unfortunately it is not possible to even temporarily remove those pecularities from the project just to test this issue.
To answer my own question:
This problem was not caused by the specifics of my project -- it happens with every project, because it may be the case that a CLJ or CLJC file contains macros that (when changed) cause CLJS files to be implicitly modified. lein-cljsbuild therefore recompiles all CLJS files.
For some background discussion, see https://github.com/emezeske/lein-cljsbuild/issues/345
I have filed a bug report at https://github.com/emezeske/lein-cljsbuild/issues/457

Trace Flash Builder compiling commands

is there a way to trace the compiler command for flash builder? I mean, I want to know the parameters and files that is compiling internally when I click "build" on FB.
Basically I moved a project to Flash Builder, and everything works fine but I have some runtime issues, and looks like the compiler is doing something wrong with some files (like using old files instead of using the one im changing, this occur only for a particular file, the rest works fine or I think that works fine). Also is different the way to embed some file, that's another reason to check what's doing internally.
I ran the game with mxmlc before, and probably I can compare what's the difference if I get the command executed by FB.
Also, I want to know how to do it if I need to research something in future.
Thanks for any help,
Regards
Flash Builder only recompiles if there has been a change to the code. So if you are changing an asset (image), for example, you won't recompile unless you also make a change to the project.
There are a few ways around this:
Easiest way is to just go into a file and press the space bar at the end of a line. It will add an extra byte to your file, but not to the project (compiler is "smart" and gets rid of unused files, classes, and characters). Since this is not a common thing, it shouldn't be an issue
Project->Clean.... That will force your workspace to rebuild and, in most cases, will also recompile your project
If #2 is failing, first delete bin-debug or whatever you are using as your debug folder, then run Project->Clean...
It's a tad bit annoying (especially when editing external libraries), but it allows for quicker re-launches of the debugger, which is the ultimate goal of that behavior.

Signal command map injection error

I am using Robotlegs to create a simple application in as3, which I have been using for a couple of months now. I seem to be getting an injection error when injecting the ISignalCommandMap into my config file, which has only started happening after I moved my application from one computer to another. It may be to do with conflicting libraries, but I have re-downloaded the newest versions of everything. I am also using starling in the application, but everything was working on the other computer.
Here is the error I am getting
Injector is missing a mapping to handle injection into property "commandMap" of object "[object Config]" with type "Config::Config". Target dependency: "robotlegs.bender.extensions.signalCommandMap.api::ISignalCommandMap|"
Any thoughts to why this has started happening?
What solved this for me was extending MVCSBundle like in this example project and then using that class in place of MVCSBundle.