-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
TypeScript issues with 9.0.0-beta.1 #6358
Comments
I also ran into issues 2, 3, and 4. Here's the tsconfig.json file of my project (which depends on blockly) if it helps.
|
Yeah this had to change a little bit with the new release. What you want to do now is: Thanks for posting this issue! I'll continue looking into the other problems =) |
If I do that, I get this error: |
Whoops, I was actually incorrect before. The new way to import generators is I've been working through the other problems you highlighted, and I think I understand all of them except for this one:
Could you explain a bit more about where you're running into problems with this? The |
Thanks, it works now!
Well, I didn't use the constructor, I just instanciated the interface (https://github.com/Orange-OpenSource/super-coding-ball/blob/eb825dc661594eec296fd378a6b6be3b440e5886/src/app/services/code.service.ts#L37-L42). Indeed it works if I use the constructor (but then I have to modify the created theme with |
Hello! I'm not super familiar with Angular, and our Angular sample doesn't seem to actually handle destruction :/ Could you post the full stack trace of your error and the code you're using to destroy the component? That way hopefully I can reproduce the issue so I'll be able to work on a fix hehe. Thank you for your time! |
Hi!
I've put my progress so far with Blockly 9 on this branch: https://github.com/Orange-OpenSource/super-coding-ball/tree/blockly9 You can just pull the branch, To encounter the issue, you can just go to the "How do we play" section, and then go back. The 3 workspaces are then disposed with https://github.com/Orange-OpenSource/super-coding-ball/blob/89bc61a5d1b8441312088cf650c43f2a1cdfb159/src/app/components/howto/howto.component.ts#L77-L79 And while it was working fine in Blockly6 (I didn't try the versions in between), with 9.0.0-beta.1 I get:
PS: I'm not sure it is an issue with Angular components being destroyed, because I get the same issue when launching a game and no component is destroyed in this case. Thanks again! |
Fixed all the issues in various pull requests! |
Describe the bug
Following this discussion https://groups.google.com/g/blockly/c/beh5vO-hbLA, I've tested Blockly 9.0.0-beta.1 with my TypeScript project (https://github.com/Orange-OpenSource/super-coding-ball).
And I have the following issues:
field-slider
plugin and I had to force install it because it is not compatible with Blockly 9 (https://github.com/google/blockly-samples/blob/master/plugins/field-slider/package.json#L50)The compiler doesn't find the classAnyDuringMigration
.There is this line https://github.com/google/blockly/blob/develop/core/any_aliases.ts#L2 but it doesn't seem to be referenced.Fixed with 9.0.0-beta.1import * as Fr from 'blockly/msg/fr';
andBlockly.setLocale(Fr);
are not found in typesimport * as Blockly from 'blockly';
thenBlockly.JavaScript
is undefinedimport * as Javascript from 'blockly/javascript';
thenJavascript.workspaceToCode()
is not foundTypeError: Workspace is headless.
ITheme
, shouldn'tFontStyle
be optionnal if I don't want to override it?colourSecondary
andcolourTertiary
inBlockly.Theme.BlockStyle
: previously I didn't set them and Blockly was fineTheme.ComponentStyle
; they are all nullable, so they should also be optional?Desktop:
The text was updated successfully, but these errors were encountered: