Doxygen Ignoring Some .h Files - xcode

UPDATE 2: The issue seems to be stemming from the files themselves, and not the contents. I've tried, across multiple repos, duplicating the broken files from the ground up (new file, copy-paste contents, rename, etc) and they work as expected with Doxygen.
UPDATE: It seems that all of the "broken" .h files are being saved as class_.html while working .h files are interface_.html. Strikes me as related.
Trying to set up Doxygen for my Xcode project and for some reason it is ignoring the .h file in one of my repos.
The basic structure of the project is 1 central repo with a handful of private CocoaPods being pulled in either from the local copy or the external repo, depending on which is more recent. Other pods projects, when run against Doxygen, generate documentation just fine. This one does not. I've tried it with a variety of configurations (EXTRACT_ALL, EXTRACT_STATIC, etc. etc.) to no avail.
When run on the following .h file, no documentation is generated and the only thing I see is "The documentation for this class was generated from the following file:", with the .m file following; clicking on that just shows some static string constants and the imports, still no method headers.
One thing I noticed is that if I set EXTRACT_LOCAL_METHODS to YES then it works...but that would imply that I am NOT defining methods in my .h, which is definitely untrue.
Am I missing something?
#import <Foundation/Foundation.h>
#import <FinderAuthApiProtocol.h>
#import <AuthCredentials.h>
//Keys to name persisted objects
extern NSString *const kCarrierAuthCredentialsPersistName;
extern NSString *const kFinderAuthCredentialsPersistName;
extern NSString *const kLastLoggedInUserName;
#interface CommonAuthManager : NSObject
/**
* Returns the singleton object for CommonAuthManager, or creates one if necessary
*
* #return pointer to the singleton instance
*/
+ (CommonAuthManager *)sharedInstance;
/**
* #brief Performs carrier-agnostic authenticaton
*
* This method is called by the UI to perform authentication with a user's
* username and password combination. The carrier-specific implementation of
* Network's FinderAuthApiProtocol determines the precise behavior but as far
* as the manager is concerned it doesn't matter; it just calls auth and waits
* for results
*
* #param userID - the user's ID (i.e. phone number, username, email, etc)
* #param password - the user's password
* #param stayLoggedIn - toggled value for refreshig auth tokens or not
* #param block - block for completion
**/
+ (void)authWithUserID:(NSString *)userID
andPassword:(NSString *)password
andStayLoggedIn:(bool)stayLoggedIn
withCompletionBlock:(void(^)(NSError *error))block;
/**
* Determines if current user is allowed to say logged in (bypass explicit login screen)
*
* YES if all the following criteria are met:
* Current user must exist in persistence store
* Current user last login attempt must have succeeded
* Current user must be allowed to stay logged in
*
* #param error return error
*
* #return Returns YES if user is allowed to stay logged in
*/
+ (BOOL)isUserAllowedToStayLoggedIn:(NSError *__autoreleasing *)error;
/**
* Abstracted-away selector for the LLCommonAuthManager's finder API credentials
**/
+ (AuthCredentials *)finderCredentials;
/**
* Abstracted-away selector for the LLCommonAuthManager's carrier API credentials
*
* NOTE: Functionality across carriers varies. For <XXX> this object will have
* the auth token, while for <YYY> it will be the username and password
* they originally authed with.
**/
+ (AuthCredentials *)credentials;
#end

Turns out Doxygen expects a newline at the bottom of the file.
Who knew.

Related

openapi-generator-maven-plugin breaks old feign with #QueryMap

Code generation for feign works fine with swagger-codegen-maven-plugin:2.2.2, unfortunatelly I was forced to move to openapi-generator-maven-plugin:2.2.14 or swagger-codegen-maven-plugin:2.2.14. When this generators processed schemas with methods having optional parameters, they duplicate method with one map parameter with annotation #QueryMap(encoded=true).
Example:
/**
* Note, this is equivalent to the other <code>someMethod</code> method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
* used with the {#link ApiV1CodesGetQueryParams} class that allows for
* building up this map in a fluent style.
* #param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>p1 - param1 (optional)</li>
* <li>p2 - param2 (optional)</li>
* </ul>
*/
#RequestLine("GET /api/v1/someMethod?p1={p1}&p2={p2}")
#Headers({
"Accept: application/json",
})
Response someMethod(#QueryMap(encoded=true) Map<String, Object> queryParams);
Old version of feign lib has no #QueryMap(encoded=true) and so compilation of java code failed. I have no opportunity to upgrade feign lib, so I won't to disable this code generator's feature but can't find any switch for it. Can anybody switch this annoying feature off?
Instead of disabling it with a switch, you can customize the Java Feign generator's template to remove QueryMap and then generate code using the customized templates with the -t CLI option.

FTP file not downloaded with Spring Integration after local deletion

We are writing a Batch Job which takes a file as input from an FTP, generates some new files and writes them to an S3 bucket, and for this we are using Spring Integration.
The file in the FTP is an extraction from a DB and is updated each night.
The problem is that, when we start the app the first time, it connects well to the FTP, downloads the file, and uploads the generation result S3. Then we delete the downloaded file locally and wait to the next generation of the file in the FTP to restart the process. But it never downloads the file again.
Any idea?
#Bean
public IntegrationFlow ftpInboundFlow() {
return IntegrationFlows
.from(ftpReader(),
spec -> spec.id("ftpInboundAdapter")
.autoStartup(true)
.poller(Pollers.fixedDelay(period)))
.enrichHeaders(Map.of("CORRELATION_ID", "rcm"))
.aggregate(aggregatorSpec -> aggregatorSpec
.correlationStrategy(message -> message.getHeaders().get("CORRELATION_ID"))
.releaseStrategy(group -> group.getMessages().size() == 2))
.transform(stockUnmarshaller)
.transform(stockTransformer)
.transform(stockMarshaller)
.transform(picturesDownloader)
.transform(picturesZipper)
.transform(stockIndexer)
.handle(directoryCleaner)
.nullChannel();
}
#Bean
public FtpInboundChannelAdapterSpec ftpReader() {
return Ftp.inboundAdapter(ftpSessionFactory())
.preserveTimestamp(true)
.remoteDirectory(rootFolder)
.autoCreateLocalDirectory(true)
.localDirectory(new File(localDirectory));
}
#Bean
public SessionFactory<FTPFile> ftpSessionFactory() {
DefaultFtpSessionFactory sessionFactory = new DefaultFtpSessionFactory();
sessionFactory.setHost(host);
sessionFactory.setUsername(userName);
sessionFactory.setPassword(password);
sessionFactory.setClientMode(FTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODE);
return sessionFactory;
}
Thanks in advance.
EDIT:
I use enrichHeaders to ensure that the pipeline is triggered if we have exactly 2 files. Maybe the headers are not removed and the condition will be always greater than 2? Maybe it's the wrong manner to proceed?
Thanks again.
Sounds like you talk about the same file. In this case deleting it from the local dir is not enough. There are some FileListFilter instances involved in the process which hold an entry for the processed file. And according to your configuration you deal with in-memory variants. They really know nothing about your local file removal.
To be precise there are two filters your need worry about: FtpPersistentAcceptOnceFileListFilter for a remote entry and FileSystemPersistentAcceptOnceFileListFilter for local copy of the file. Both of them are implementing ResettableFileListFilter, so, you can call their remove() whenever you done with file process.
The FtpInboundChannelAdapterSpec in Java DSL has these options:
/**
* Configure a {#link FileListFilter} to be applied to the remote files before
* copying them.
* #param filter the filter.
* #return the spec.
*/
public S filter(FileListFilter<F> filter) {
/**
* A {#link FileListFilter} used to determine which files will generate messages
* after they have been synchronized.
* #param localFileListFilter the localFileListFilter.
* #return the spec.
* #see AbstractInboundFileSynchronizingMessageSource#setLocalFilter(FileListFilter)
*/
public S localFilter(FileListFilter<File> localFileListFilter) {
So, you still can have those mentioned filters as default, but you extract them as beans and inject into these options and into your directoryCleaner to perform removal from those filters as well.
There is also an option like:
/**
* Switch the local {#link FileReadingMessageSource} to use its internal
* {#code FileReadingMessageSource.WatchServiceDirectoryScanner}.
* #param useWatchService the {#code boolean} flag to switch to
* {#code FileReadingMessageSource.WatchServiceDirectoryScanner} on {#code true}.
* #since 5.0
*/
public void setUseWatchService(boolean useWatchService) {
And DELETE event is configured for watcher as well. When it happens a removed file is also deleted from the local filter.
You may also deal properly with a remote file when you configure:
/**
* Set to true to enable the preservation of the remote file timestamp when transferring.
* #param preserveTimestamp true to preserve.
* #return the spec.
*/
public S preserveTimestamp(boolean preserveTimestamp) {
This way a newer file with the same name will be treated as a different file and its entry in the mentioned filters will be overwritten. Although I see you use it already, but you still complain that it doesn't work. It might be the case with some old version of Spring Integration when FileSystemPersistentAcceptOnceFileListFilter was not used for local files.
The inbound channel adapter has two filters .filter and .localFilter.
The first filters the remote files before downloading, the second filters files on the file system.
By default the filter is a FtpPersistentAcceptOnceFileListFilter which will only fetch new or changed files.
By default, the localFilter is an FileSystemPersistentAcceptOnceFileListFilter which, again, will only pass a file a second time if it's timestamp has changed.
So the file will only be reprocessed if its timestamp changes.
I suggest you run in a debugger to see why it is not passing the filter.

Apidocjs throws warnings when i attempt to update

Ok, so I'm playing around with apidocjs to figure it out before implementing it in a production environment and am incountering the following:
~/apidoc_playground$ apidoc
warn: parser plugin 'param' not found in block: 0
info: Done.
the following are the block comments it is looking at (each in a separate file):
/**
*this is a test of apidocjs
*#api {get} /user/:id Request User information
* #apiName GetUser
* #apiGroup User
*
* #apiParam {Number} id Users unique ID.
*
* #apiSuccess {String} firstname Firstname of the User.
* #apiSuccess {String} lastname Lastname of the User.
*
*/
/**
*#api {GET} /getPicture/:UID Retreive user profile picture
*#apiGroup User
*#apiName getPicture
*#apiVersion 0.0.1
*
*#apiDescription userID goes in, picture comes out, you can't explain that!
*#apiParam {int} UID User's identification number.
*#apiExample {curl} Example usage:
* curl -i http://api.example.com/getPicture/45123
*#apiSuccess (200) {json} picture The user's profile picture
*#apiError (4xx) {userNotFound} UID There was no user affiliated with the given id.
*#apiErrorExample {json} Error-Response:
* HTTP/1.1 404 Not Found
* {
* "error":"UserNotFound"
* }
*/
What i know already :
This does not cause the update to fail, apidoc updates the output directory as intended.
If i delete the output directory before calling apidoc, there is no warning.
the warning still occurs if it has no files to parse.
after scouring for an answer the most i can find is one question that is similar to mine except that the asker also has format errors in his apidoc.json. That being said, the answers in that thread don't really meet what i'm looking for (one being delete the output folder before calling apidoc, and the other being don't delete the output folder if you want to keep history and maybe you have format errors).
Any insights from more experienced users of apidocjs would be appriciated.
sorry for the wall-of-text
If it happens even when both the input and output directories are empty, that indicates there's probably something wrong with the install.
Try to wipe and re-add it.
npm remove -g apidoc
npm install -g apidoc

Laravel App::make causes infinite loop

I'm creating some project management functionality.
I'm using Model Observers in Laravel to create an audit trail whenever models are created/updated/deleted. So for example when a project is created, the observer will automatically create a new instance of the project audit model creating a new database entry storing the fields that have changed. This observer also clears the relevant caches, ensuring the user can access the most recent information.
The problem is calling the cache repository causes this error message (with no stack trace):
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR)
Maximum function nesting level of '100' reached, aborting!
I'm using App::make to call the cache repository:
$this->projectAuditCache = App::make('cache\ProjectManagement\Interfaces\ProjectAuditCacheInterface');
The Audit Cache Repository then constructs with only one other repository which isn't reliant on anything else.
The only possible clue on the stack trace is this:
Open: /home/vagrant/Sites/fixing/new_fixing/vendor/laravel/framework/src/Illuminate/Container/Container.php
* Determine if the given abstract has a leading slash.
*
* #param string $abstract
* #return bool
*/
protected function missingLeadingSlash($abstract)
{
return is_string($abstract) && strpos($abstract, '\\') !== 0;
}
Is there a way to get this to work? Is using App::make the wrong way to go about this?
Thanks, Ed
The problem which causes the error is xdebug the debug extension of PHP.
The array that this extension wants to echo is to big.
You can just simply adjust the setting of maximum nesting level of xdebug simply in your php.ini.
Or with the command
ini_set('xdebug.max_nesting_level', $limit)
which should be included when your app starts. For Laravel 4.x that would be app/start/global.php.
Source: StackOverflow

Reuse variable name when inserting an Xcode snippet [duplicate]

Can I create a custom snippet that takes a parameter that is replaced multiple times inside the code?
I tried something like:
<#class#> instanceOf<#class#>;
but it doesn't replace both class placeholders when I insert the snippet and write over the first parameter.
In Xcode 10 we can replace placeholder tokens with the same name by doing this:
Highlight the first token.
Add other tokens with the same name to the selection by pressing ⌥⌘E once for each token. ⌥⇧⌘E selects previous tokens.
Start typing. This activates multiple cursors so each token gets replaced.
It's not as quick as replacing every token with the same name by default, but it does give you more control over what gets replaced.
This is not possible in Xcode 4.x at the time of writing (Sept. 2011).
If you want this feature back in Xcode 4.x, please go to bugreport.apple.com and report a duplicate for this rdar that I just preported:
Summary: Xcode 4 snippets with tokens of same name should sync
while filling one of them.
Steps to Reproduce:
1. Define this snippet: extern NSString * const <#constant#>;
NSString * const <#constant#> = #"<#constant#>";
Drop it into your code.
Hit tab to select instance of token <#constant#>.
Type "NSMySuperCoolConstantString".
Expected Results:
5. NSString * const <#constant#> = #"<#constant#>"; should turn into
NSString * const NSMySuperCoolConstantString =
#"NSMySuperCoolConstantString"; as it used to do in v3.x.
Actual Results:
5. NSString * const <#constant#> = #"<#constant#>"; stays
unchanged/unsynced.
Regression:
Notes:
Here is the rdar reference for duping:
rdar://10071607
And here a copy on OpenRadar:
http://openradar.appspot.com/radar?id=1327411
While you're at it: Feel free to dupe this rdar as well:
"Xcode 4: snippet functionality regressions"
rdar://9192757
http://openradar.appspot.com/9192757

Resources