Skip to content

Conversation

@corneadoug
Copy link
Contributor

Branch to help #321

  • - Checking the build system
  • - Fixing grunt serve
  • - Replacing JSHint with TSLint
  • - Fix TSLint errors
  • - Try yoman .ts creation
  • - Help with documentation + documentation of tools and plugin

@corneadoug
Copy link
Contributor Author

I deactivated some rules from the original TSLint configuration because there was too many errors and TSLint is now a blocker in the build.

We will have to discuss if we reactivate them in the future:

  • no-use-before-declare
  • no-unused-variable
  • no-duplicate-variable
  • typedef check

@swkimme
Copy link
Contributor

swkimme commented Feb 15, 2015

AWESOME job! You should've spent many of your weekend for this job!
I'll try it right now.

@swkimme
Copy link
Contributor

swkimme commented Feb 15, 2015

I've tried yeoman ts creation and it works well.
But the process is quite complex. :(
You need to download yeoman and angular-generator with ts, and manually link it.

@corneadoug
Copy link
Contributor Author

I saw that you documented the way to include the plugin.
Just like yoman is not part of the build, other tools or plugin that can help developers should be documented, it's not like we can include them for the user.

125 TSLint errors left hahahaha

@swkimme
Copy link
Contributor

swkimme commented Feb 15, 2015

Let me correct the tslint errors. IntelliJ will help me!

@corneadoug
Copy link
Contributor Author

It's okay, I'm already doing it

@swkimme
Copy link
Contributor

swkimme commented Feb 15, 2015

OK, cheers!

@corneadoug
Copy link
Contributor Author

Fixed the TSLint errors, I removed some more rules:

  • interface-name
  • empty-block

@corneadoug
Copy link
Contributor Author

@swkimme I think we should get the option 'typedef check' back so that we can pass the whole app in typescript.
However there is some problems:

  • The amount of errors will be huge
  • We will need to create classes for everything, where do we place them? Because it will be a lot of lines.

@swkimme
Copy link
Contributor

swkimme commented Feb 16, 2015

@corneadoug
If classes are small, we can just put it in a file like types.ts,
and when classes get bigger, we can divide them, like notes.ts, paragraphs.ts, ..
and if it get bigger, we can make a package-like dir structure and put class files under them,
like paragraph/paragraph.ts, paragraph/config.ts, ..

I've got some big project using Typescript for reference. Plz take a look at!
https://github.com/mozilla/shumway

@corneadoug
Copy link
Contributor Author

For what I see from that repo, all variable declarations do not need a type?
Should we include types only when they are in function parameters?

@swkimme
Copy link
Contributor

swkimme commented Feb 16, 2015

You have to declare class or interface 'members' with type,

and for just a variable, you don't need to put type everytime.

(O)
interface A {
a: string;
}
(O)
var b = 1
(O)
var b: number = 1

Also for function parameters, Typescript has a type inference system for it, you don't need to type it everytime.

@corneadoug
Copy link
Contributor Author

@swkimme Since you know better about typescript synthax, can you change 'typedef' to true in tslint.json, run grunt tslint and see which rule of typedef we should keep?

@swkimme
Copy link
Contributor

swkimme commented Feb 16, 2015

@corneadoug

Positive for call-signature and parameter,
it will change our codes like this and it's safer and better.

  • function getWebsocketProtocol(blah) {
  • function getWebsocketProtocol(blah: number): string {

but negative for property and variables.
It will make our code too much verbose and hard to code.
I think
var b = 1
is just OK, and still we can optionally supply types like
var b: number = 1
if we really need to do it.

Also for function parameter, I'd like to leave it optional since sometime it will be quite too much verbose when we got some code snippets and paste it.

So, what if we just add call-signature typedef only?
that means, from now we need to do like

  •  var retryRenderer = function() {
    
  •  var retryRenderer = function(): void {
    

Or if you prefer adding parameter typedef, I'm OK with it.

@swkimme
Copy link
Contributor

swkimme commented Feb 23, 2015

@corneadoug
Damien, let's wrap up this things!

@Leemoonsoo
Copy link
Contributor

Any updates?

@swkimme
Copy link
Contributor

swkimme commented Mar 16, 2015

I'm OK with merge it, without yoman.

@corneadoug
Copy link
Contributor Author

Didn't got time to work on it recently, there is also some tslint errors left with the rules we set. I will try to finish it this week.

@corneadoug
Copy link
Contributor Author

@swkimme I have a problem with both grunt-ts and grunt-typescript
It compile without any typescript errors, however when the IDE is compiling the typescript, it brings tons of errors. Seems like nobody run the pre-processors. Do you have any idea?

@corneadoug
Copy link
Contributor Author

@swkimme okay, nevermind, errors on IDE suddenly disappeared...

epahomov pushed a commit to epahomov/zeppelin that referenced this pull request Jul 23, 2016
Issue described https://issues.apache.org/jira/browse/ZEPPELIN-350

This PR fixes CI test failure by changing spark package download address from http://www.us.apache.org/dist/spark to http://archive.apache.org/dist/spark

Author: Lee moon soo <moon@apache.org>

Closes ZEPL#351 from Leemoonsoo/ZEPPELIN-350 and squashes the following commits:

0f6a749 [Lee moon soo] Update spark.download.url, too
0ead0b9 [Lee moon soo] Change address to archive.apache.org from www.apache.org to download all spark packages
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.

5 participants