Skip to content

chore: fewer warnings for docs generation #9864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"axe-webdriverjs": "^1.1.1",
"chalk": "^1.1.3",
"dgeni": "^0.4.9",
"dgeni-packages": "^0.22.0",
"dgeni-packages": "^0.24.1",
"firebase": "^4.0.0",
"firebase-admin": "^5.0.0",
"firebase-tools": "^3.11.0",
Expand Down
5 changes: 4 additions & 1 deletion src/lib/datepicker/datepicker-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ export class MatDatepickerInput<D> implements AfterContentInit, ControlValueAcce
return this._validator ? this._validator(c) : null;
}

/** @deletion-target 7.0.0 Use `getConnectedOverlayOrigin` instead */
/**
* @deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jelbourn do we want to mark these deprecated now or wait until 6.0.0?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As early as possible is always good

* @deletion-target 7.0.0 Use `getConnectedOverlayOrigin` instead
*/
getPopupConnectionElementRef(): ElementRef {
return this.getConnectedOverlayOrigin();
}
Expand Down
5 changes: 4 additions & 1 deletion src/lib/form-field/form-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ export class MatFormField extends _MatFormFieldMixinBase

_outlineGapStart = 0;

/** @deletion-target 7.0.0 */
/**
* @deprecated
* @deletion-target 7.0.0
*/
@ViewChild('underline') underlineRef: ElementRef;

@ViewChild('connectionContainer') _connectionContainerRef: ElementRef;
Expand Down
4 changes: 4 additions & 0 deletions tools/dgeni/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Package} from 'dgeni';
import {patchLogService} from './patch-log-service';
import {DocsPrivateFilter} from './processors/docs-private-filter';
import {Categorizer} from './processors/categorizer';
import {FilterDuplicateExports} from './processors/filter-duplicate-exports';
Expand Down Expand Up @@ -79,6 +80,9 @@ apiDocsPackage.config((readFilesProcessor: any, writeFilesProcessor: any) => {
writeFilesProcessor.outputFolder = outputDir;
});

// Patches Dgeni's log service to not print warnings about unresolved mixin base symbols.
apiDocsPackage.config((log: any) => patchLogService(log));

// Configure the output path for written files (i.e., file names).
apiDocsPackage.config((computePathsProcessor: any) => {
computePathsProcessor.pathTemplates = [{
Expand Down
24 changes: 24 additions & 0 deletions tools/dgeni/patch-log-service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

/**
* Function that patches Dgeni's instantiated log service. The patch will hide warnings about
* unresolved TypeScript symbols for the mixin base classes.
*
* ```
* warn: Unresolved TypeScript symbol(s): _MatToolbarMixinBase - doc "lib/toolbar/MatToolbar"
* (class) - from file "lib/toolbar/toolbar.ts" - starting at line 37, ending at line 98
* ```
*
* Those warnings are valid, but are not fixable because the base class is created dynamically
* through mixin functions and will be stored as a constant.
*/
export function patchLogService(log: any) {
const _warnFn = log.warn;

log.warn = function(message: string) {
if (message.includes('Unresolved TypeScript symbol') && message.includes('MixinBase')) {
return;
}

_warnFn.apply(this, [message]);
};
}