Skip to content
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

Import DataSource Restructuring (1) #2951

Merged
merged 9 commits into from Oct 16, 2017
Merged

Conversation

adube
Copy link
Contributor

@adube adube commented Oct 3, 2017

This PR introduces a restructuring of the data source definition within ngeo and gmf to allow the upcoming new "file" data source type.

In summary:

  • we now have ngeo.datasource and gmf.datasource namespaces (directories)
  • all classes directly related to data sources were moved in there
  • ngeo.Datasource has been replaced by:
  • ngeo.datasource.DataSource - the abstract class for a data source
  • ngeo.datasource.OGC - a data source that uses OGC services to fetch/display its data
  • gmf.DataSource has been replaced by gmf.datasource.OGC

The 'externs' definitions have been updated as well.

@adube adube force-pushed the import-ds-01-restructuring branch from b5df3d0 to 5e761d5 Compare October 3, 2017 17:11
@adube adube changed the title WIP - Import DataSource Restructuring Import DataSource Restructuring Oct 3, 2017
@adube adube requested a review from fredj October 3, 2017 17:15
@adube
Copy link
Contributor Author

adube commented Oct 3, 2017

@fredj Ready for review.

@adube adube force-pushed the import-ds-01-restructuring branch from b5d5fbf to c0e5a4b Compare October 3, 2017 17:43
@adube
Copy link
Contributor Author

adube commented Oct 3, 2017

@fredj Do you know why Travis is failing? It seems to happen to me very often and I never really know why. If you do know why, I'd like to learn how to understand what's wrong to avoid asking that same question too many times.

@adube
Copy link
Contributor Author

adube commented Oct 4, 2017

Just a reminder: I still don't know what's wrong with Travis. Any hint would be welcome.

@adube adube force-pushed the import-ds-01-restructuring branch from c0e5a4b to 3c2c630 Compare October 4, 2017 12:16
@adube adube mentioned this pull request Oct 5, 2017
5 tasks
@sbrunner
Copy link
Member

on the deployement part:

ERR! compile Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m

ERR! compile 

ERR! compile /home/travis/build/camptocamp/ngeo/contribs/gmf/src/directives/layertree.js:682: ERROR - Bad type annotation. Unknown type gmf.datasource.DataSource

ERR! compile  * @param {gmf.datasource.DataSource} ds Data source to filter.

ERR! compile            ^

ERR! compile 

ERR! compile 

ERR! compile 1 error(s), 0 warning(s)

ERR! compile 

ERR! Process exited with non-zero status, see log for more detail: 1 

and

ERR! compile Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m

ERR! compile 

ERR! compile /home/travis/build/camptocamp/ngeo/src/datasource/ogc.js:428: ERROR - variable parent is undeclared

ERR! compile     return parent.attributes;

ERR! compile            ^^^^^^

ERR! compile 

ERR! compile 

ERR! compile 1 error(s), 0 warning(s)

ERR! compile 

ERR! Process exited with non-zero status, see log for more detail: 1 

@adube
Copy link
Contributor Author

adube commented Oct 10, 2017

@sbrunner Thanks.

How were you able to see this? These errors are not reported by Travis.

For me, locally, make check still doesn't work (it's been months since I last saw this working).

@fredj
Copy link
Member

fredj commented Oct 10, 2017

How were you able to see this? These errors are not reported by Travis.

They are, but they are a bit hidden. To get the error what I usually do is:

  • open travis build
  • open the failing build
  • click "Row log" button
  • scroll to the bottom of the page

@adube
Copy link
Contributor Author

adube commented Oct 10, 2017

return parent.attributes;

parent refers to the parent class. This is not a variable. How come this fails? How can I avoid the error?

@fredj
Copy link
Member

fredj commented Oct 12, 2017

@adube #2974 should fix the compile error

@adube
Copy link
Contributor Author

adube commented Oct 12, 2017

@fredj The current error reported by Travis seems to be caused something that's not yet implemented in the compiler. Would you please investigate again?

@adube adube changed the title Import DataSource Restructuring Import DataSource Restructuring (1) Oct 12, 2017
} else {
features = dataSource.wmsFormat.readFeatures(response.data);
features = []
Copy link
Member

Choose a reason for hiding this comment

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

semicolon

Copy link
Member

Choose a reason for hiding this comment

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

fixed

Copy link
Member

@fredj fredj left a comment

Choose a reason for hiding this comment

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

please merge when travis is green

@adube
Copy link
Contributor Author

adube commented Oct 13, 2017

@fredj One last error reported by Travis. Do you know what's wrong? That doesn't seem related by my patch.

@fredj
Copy link
Member

fredj commented Oct 16, 2017

See https://travis-ci.org/camptocamp/ngeo/jobs/287557316#L1271

ERR! compile /home/travis/build/camptocamp/ngeo/contribs/gmf/src/datasource/datasourceshelper.js:56: ERROR - Bad type annotation. Unknown type gmf.datasource.DataSource
ERR! compile      * @type {Object.<number, gmf.datasource.DataSource>}
ERR! compile                               ^
ERR! compile 
ERR! compile /home/travis/build/camptocamp/ngeo/contribs/gmf/src/datasource/datasourceshelper.js:75: ERROR - Bad type annotation. Unknown type gmf.datasource.DataSource
ERR! compile    * @return {?gmf.datasource.DataSource} Data source.
ERR! compile                ^
ERR! compile 
ERR! compile /home/travis/build/camptocamp/ngeo/contribs/gmf/src/datasource/datasourceshelper.js:79: ERROR - Bad type annotation. Unknown type gmf.datasource.DataSource
ERR! compile     return /** @type {?gmf.datasource.DataSource} */ (
ERR! compile                        ^
ERR! compile 
ERR! compile /home/travis/build/camptocamp/ngeo/contribs/gmf/src/datasource/datasourceshelper.js:138: ERROR - Bad type annotation. Unknown type gmf.datasource.DataSource
ERR! compile  * @typedef {ol.Collection.<gmf.datasource.DataSource>}
ERR! compile                             ^
ERR! compile 
ERR! compile 4 error(s), 0 warning(s)
ERR! compile 

@adube adube merged commit 167316b into master Oct 16, 2017
@adube adube deleted the import-ds-01-restructuring branch October 16, 2017 15:24
@sbrunner sbrunner added this to the 2.3 milestone Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants