How can i ignore the warning when i deleted a piece manually from my apostrophe-project? - content-management-system

I have deleted a piece from my apostrophe project manually. now when i run the project it is shows as a warning that:
It looks like you may have made a mistake in your code:
The module banners does not extend anything and does not have a
beforeConstruct, construct or afterConstruct function. This usually means that you:
Forgot to extend another module
The module banners does not extend anything and does not have a
beforeConstruct, construct or afterConstruct function. This usually means that you:
Forgot to extend another module
Configured a module that comes from npm without npm installing it
Simply haven't written your index.js yet
If you really want a module with no code, set the ignoreNoCodeWarning option
to true for this module.
What should i do to ignore this warning?

Related

Why is Solidity Vscode Intellisense only working if i explicitly specify an Open Zeppelin contract

I'm struggling severely to configure my Vscode working properly.
I have imported contract of openzeppelin - ERC721.sol
Now I expected its function _mint() be available in intellisense when i start typing it in my contract, but here is what i see if I start typing it and then click Ctrl+Space:
In the same time if i explicitly type the contract name - then i can see intellisense autocompletion:
How can i make it possible to simply get intellisense suggestion of this function once i start typing it?
UPDATE: I provided a bigger code snippet and simplified to minimum for example purposes.
UPDATE: I realised that the autocompletion now in the vscode solidity plugin works in a way that ignores the modules from node_modules. Quick way to test it - I put my contract file into the openzeppelin module folder, next to the ERC721.sol - autocompletion works fine. (suggested by #marko-popovic)
Question remains the same though: Isn't that possible to make it so that I could use autocompletion for modules that are present in node_modules and imported into my contract?
In you case, ERC721 is imported from NPM (using #), while the imported files in the extension demo video are in the same directory as the contract that is importing them.
To enable intellisense, either keep using the NPM import style and prefix the method names with ERC721. (which would be my suggestion), or move the openzepellin code manually into the same folder as your contract.
Finally, you cannot achieve that with the current version of the extension, as it is obviously works properly, but has this limitation with different types of imports. This might be improved in some future version, but if you want to get that feature right now you will either have to move the code manually or maybe look for another extension.

How to make VSCode's python debugger skip stepping into some modules when debugging

In vscode's python (ms-python) extension, is there a way to make the debugger (debugpy) not to step-into functions defined in specific modules. I have found justMyCode but it will skip entering into external modules only (like members of stdlib) while I need to skip my own modules sometimes.
I saw some debug adaptors for some other languages implement skipFiles property. Is there anything similar for python?
Going thru debugpy code I found this undocumented feature which works like a charm: in launch.json's debug configuration add
"rules" : [{"module":"*xxx*", "include":false}]. Make sure the xxx is the full module name like a.b.module
There are more working options. They can be seen here
A word of warning. This feature is undocumented (at least I did not find it anywhere) so use with caution as it might disappear one day. At the other hand, this feature is properly tested as part of the code uni-testing (as you can see from the link)

Unknown Type Errors when using functionblocks from my own library project

So I have a library project where I defined a couple of functionblocks and interfaces.
Now I want to use this library in a plc project (in the same twincat solution). So I do the whole save all, rebuild, save and install as a library spiel. If I try to declare a VAR in my MAIN it will result in unknown type errors. I have fiddled around a bit, and when I declare an interface withouth any properties or methods (in the lib) then I it does show up and can be used in the MAIN. But as soon as I add a property or method the class/FB/POU dissapears in the eyes of my MAIN...
I feel like I'm overlooking some option / atribute to help the PLC project to use the lib properly...
What am I missing here?
EDIT:
as you can see in the images, empty blocks are found, adding anything magically makes it dissapear
error
available classes
EDIT 2:
I solved my problem by copying the lib to a new solution. Something in the original project made it be broken. Why it did that is still a mystery...
Try following steps:
clean the solution where you programmed the library.
right click on the project and click check all objects
if this is successfull, install the library again, remove it from the reference section and re-add it.
Then clean again and build all.

Cannot import library on Haxe & FlashDevelop

I added some classes through http://lib.haxe.org/ and git with the correct command (haxelib install x) and, while the classes are in the haxe/lib folder, I can't access most of them. Sometimes I'm able to import a library(I get the autocomplete and everything), but when I try to compile it gives me the error Class not found.
I searched everywhere and I still don't know how to fix this. I tried to add through Project>Properties>Classpath and I'd even edited the global Classpath but it still won't work. Right now my problem is with the library linden-google-play but I tried with another libraries and it didn't work either.
AdMob and Firetongue libraries work perfectly, and I can't understand why. Does anyone knows a way to fix this?
Thanks!
I finally found out how to do it. You have to go to Project.xml and add the library name manually.
<haxelib name="openfl" />
<haxelib name="task" />
You don't need to change the class path configuration that is reserved for your local projects/libraries. Go to Project Properties>Compiler Options>Libraries and add one library per line (the lib name must match what you used in haxelib install ...).

Make eclipse remove unused imports but keep unresolved

Is there a way to make Eclipse keep used but unresolved imports?
I'm using Eclipse's save actions to remove unused imports. Unfortunately it also removes imports that are used, but not unresolved.
In the example below, eclipse will remove GeneratedClass, if I save MyClass before generating the GeneratedClass. When I late generate the code, MyClass will be missing the import.
import a.b.GeneratedClass;
public class MyClass extend GeneratedClass {}
Thanks to Bananeweizen and Krispy for their contributions, but so far it seems that the answer to this question is No.
The most efficient work around for me, is just to hit ctrl+z every time I save a file with unresolved imports.
I have submitted a bug to Eclipse's bugtracker: https://bugs.eclipse.org/bugs/show_bug.cgi?id=395538
This Eclipse bug tracks this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=357795
Don't use the save macros and instead hit Ctrl-Shift-O which will give you more explicit control over when the imports should be tidied up.
You can disable the clean up action and instead remove the unwanted imports manually one by one using Ctrl1 to invoke the quick fix for that.
Nevertheless you are just trying to hide the real problem. The real problem is that your generated code is not generated at the right time. You should fix that. If you don't know how to automatically involve actions in Eclipse during every project build, please look at this example (which automatically creates a jar file with a custom script during every build). You can have those builders applied to the project in any order that you want, so you can always have your code generation invoked automatically before the Java compiler, on saving your Java files.