Add build

Build works for me: https://github.com/parsley72/IoTGoat/actions/runs/11412668338

Thank you for the PR @parsley72. Would you please summarize the functionality and some of what you intend with adding builds? Are we expected to see build artifacts are stored after one is complete? appreciate it!

Why do you need a reason for getting the build to work? I wanted to get the build to work, it didn't work so I fixed it.

Thank you for getting the build to work and surfacing a gap in this project for contributors. I have added the standard OWASP Contribution guidelines that all projects abide by. Im specifically asking for 5. Your pull request includes a clear and concise description of the changes you have made. I appreciate you taking the time to fix the build issue and providing the required information to review so I can get this merged. Thank you!

The commit comments are comprehensive and include links to sources.


"Disable double-quoted string literals" broke my usage

Commit ed99db83671cdf65aeb34b1bcd490ba66d712e97 made it so the query
SELECT count() FROM objects WHERE id == "baz";

which previously returned 0, to error with
sqlutil.Exec: sqlite: prepare "SELECT count() FROM objects WHERE id == \"baz\"": SQL logic error: no such column: baz

Am I doing something wrong?

Pretty sure it's a bug, as
SELECT count() FROM objects WHERE id == 'baz';

works as expected.

See https://www.sqlite.org/lang_keywords.html
Double quotes are used to escape column identifiers, but SQLite has a quirks mode where they can be used as a string delimiter if no such column exists for historical compatibility. crawshaw.io/sqlite had the default quirks mode off, which is what that commit is restoring.

Huh! TIL!


Import objc forward declarations

Let us attempt to import incomplete types, even with just a placeholder.

@swift-ci Please smoke test

@swift-ci Please Test Source Compatibility

@swift-ci Please Test Source Compatibility

@swift-ci Please test

@swift-ci Please Test Source Compatibility

@swift-ci Please Test Source Compatibility

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test

@swift-ci Please Test Source Compatibility

@swift-ci Please Test Source Compatibility

@swift-ci Please Test Source Compatibility

@swift-ci please test

@swift-ci Please Test Source Compatibility

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please smoke test

@swift-ci please test source compatibility

@swift-ci please stress test

@swift-ci Please test

@swift-ci Please test source compatibility

@swift-ci please stress test

@swift-ci Please test

@swift-ci Please test source compatibility

@swift-ci Please test :)

@swift-ci Please test

@swift-ci Please test source compatibility

@swift-ci Please stress test

This is the implementation for SE-0384. I've left some comments in areas I'm not sure about that are worth taking a look, sorry about all the ci comments.
Changes:
During the proposal review it was discussed briefly if having the placeholder protocol inherit from NSObjectProtocol was sound. Seems there are legitimate use cases of importing non NSObjectProtocol inheriting protocols, and the benefit seems limited, so I have removed it. I've added a test for this, as well as a test for NSProxy, which was also raised during the review.
I've also added resolution of forward declared classes and protocols to their @objc exposed Swift definitions. This already happened automatically with Clang definitions, we need this to make the experience consistent with Swift definitions.
Testing:
I have this draft PR https://github.com/apple/swift/pull/62649 which is identical to this one, save for the flag is enabled by default. I used this to test against the source compatibility suite and source kit stress test. The release variant of source compatibility is failing at the moment, but its just broken for unrelated reasons in my estimation.
I also have this LLDB draft PR where I am writing tests to ensure importing forward declarations is gracefully disabled in the REPL and during expression evaluation in LLDB: https://github.com/apple/llvm-project/pull/6114. I'm still working out how to write the LLDB test, but looks fine so far.

Hey, @zoecarver @beccadax could I get some feedback on this 🙂 ?. Happy to ask anyone else, not sure who owns ClangImporter related changes.

@swift-ci Please test

@swift-ci Please test source compatibility

Updates:

When attempting to resolve a forward declared type to a definition, look at all imported Swift modules, not just those imported at the use site. This is required for the scenario shown in test: incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift.

It turns out Clang modules also behave this way (ie. importing the defining module makes resolves forward declarations, regardless of what file they are imported in)

Since we no longer need to know the imports visible at the use site, I've removed the lookUpValueWithContext related code.

Potential Improvement:
We no longer care what module an @objc annotated Swift declaration comes from, as long as it is available. Our lookup cache no longer needs to be module specific, we could save some time by not iterating through them all every time and just doing the lookup on the cache directly.

Hi @NuriAmari , we had a chance to discuss this with the full language workgroup, and we came to the decision that supporting forward declarations to @objc classes defined in Swift would require a separate pitch/proposal. Even though Clang allows it, Swift's lack of separation between interface and implementation prevents the kind of dependency cycles that forward declarations can be used to break, and we don't want Obj-C forward declarations to act as a "back door" to create these kinds of semi-cyclic dependencies in Swift.
For SE-0384 and this PR, we'd like to have the compiler emit an error if a Swift type is found that matches a forward-declared type but it is not defined in the same module (via an overlay or bridging header). Can you make that change?

For SE-0384 and this PR, we'd like to have the compiler emit an error if a Swift type is found that matches a forward-declared type but it is not defined in the same module (via an overlay or bridging header). Can you make that change?

Just to be clear, emit an error and still synthesize a placeholder definition for the forward declaration, or emit an error and drop the forward declaration? Personally until another pitch / proposal can go through, I prefer the latter (dropping).
With regards to the separate pitch / proposal I've created the pitch: https://forums.swift.org/t/pitch-resolve-objective-c-forward-declarations-to-objc-swift-definitions/62920. If the language group has specific concerns, I'd appreciate feedback as I'll likely pursue that after this lands.

If the user attempts to use a forward declaration that is found to be defined in a different Swift module, we attach a note to the forward declaration. We do not synthesize a placeholder. The user referencing any declaration that depends upon this forward declaration, will see the note, pointing out the forward declaration and explaining that it "shadows" an @objc Swift definition in another module, and was thus not imported. If possible, I will point to that Swift definition as well.
Drawbacks to consider. Importing new Swift modules will then have the ability to break previously working code. Maybe justly so, but I'm sure users will find this confusing. Let me know if that sounds reasonable.

That sounds reasonable, but if you're only referring to notes, where/on which one do you intend to emit the error about the shadowing?
Regarding the last point, I don't think that breakage would occur in practice because forward-declaring a Swift @objc class already shouldn't be expected to work. As an example, let's say Swift module A defines an @objc class, and Clang module B only forward declares that class and has some API that references it. Even if Swift module C that imports both A and B, the APIs in B that refer to A won't work, so anyone trying to forward-declare a Swift class in Obj-C is already putting their build in a fragile and unreliable state.

That sounds reasonable, but if you're only referring to notes, where/on which one do you intend to emit the error about the shadowing?

So the current diagnostics look like this:
_ = giveAFoo() // This doesn't!

test.swift:5:5: error: cannot find 'giveAFoo' in scope
_ = giveAFoo()
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FooObjCWrapper.h:3:1: note: function 'giveAFoo' not imported
Foo* giveAFoo();
^
FooObjCWrapper.h:3:1: note: return type not imported
Foo* giveAFoo();
^
FooObjCWrapper.h:3:1: note: interface 'Foo' is incomplete
Foo* giveAFoo();
^
FooObjCWrapper.h:3:1: note: interface 'Foo' forward declared here
@class Foo;
^

I was thinking the "interface 'Foo' is incomplete" would be replaced with something about being incomplete and shadowing a Swift declaration. Then ideally I'd point at the Swift declaration, like I do the forward declaration, but I've never tried to do something like that, so I can't make any promises.
So the answer to "where / on which one" is, the one you are "using". The one in scope from the Clang declaration you are using, but that can't be imported. To be clear here, the note is the error about shadowing.

so anyone trying to forward-declare a Swift class in Obj-C is already putting their build in a fragile and unreliable state.

Fair enough, I don't think that was clear to people.

I think that sounds reasonable; @beccadax do you have any concerns here?

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test source compatibility

@swift-ci Please test

@swift-ci Please test source compatibility

@swift-ci Please test

@swift-ci Please test source compatibility

Hi @allevato @beccadax this is ready for review again. As described I have stopped synthesizing a placeholder if a matching Swift declaration is found and added a new diagnostic:
objc-library-forward-declaring-complete-swift-types.h:X:Y: note: incomplete interface 'Foo' shadows an imported @objc Swift class from module 'CompleteSwiftTypes'; import the generated Swift header for module 'CompleteSwiftTypes' in this header to realize this declaration
@class Foo;
^

If its a protocol, interface / class are replaced with protocol but the diagnostic is otherwise the same for protocols. I tried adding a note to point out the "offending" @objc Swift declaration, but the source location on these declarations is invalid for some reason (see comment above).
CI has been quite unstable recently, so I'm not sure it will pass, but everything as of late has looked unrelated. Please let me know if there's anything that needs adjusting 🙂 . Thanks!

I was thinking the "interface 'Foo' is incomplete" would be replaced with something about being incomplete and shadowing a Swift declaration. Then ideally I'd point at the Swift declaration, like I do the forward declaration, but I've never tried to do something like that, so I can't make any promises.

The terminology isn't quite right here: decl A shadows decl B if A is "closer" during name lookup and therefore is the declaration that the compiler selects, so here, the complete declaration is shadowing the incomplete one, not the other way around.
I might avoid the idea of "shadowing" and instead say something like:
interface 'Foo' is incomplete and cannot be imported as a stub; its name conflicts with a %0 in module %1

Where %0 is the DescriptiveDeclKind of the complete Swift declaration, and %1 is the module that contains the complete Swift declaration.

@swift-ci Please test

@swift-ci Please test source compatibility

@beccadax When you get a chance, I've updated the PR with the diagnostic you suggested.

Source compat passes with the flag on: https://github.com/apple/swift/pull/62649. Stress test fails, but other jobs are failing in the same way, seems unrelated. The Windows test here isn't really pending, it finished successfully: https://ci-external.swift.org/job/swift-PR-windows/8806/

@swift-ci Please test windows platform

Hi everyone,
I wanted to draw attention to two aspects of this implementation that maybe were not entirely clear.

The ClangImporter option ImportForwardDeclarations existed before this change and was used by swift-ide-test to print interfaces with placeholders to represent forward declared interfaces and protocols. Per the discussion above, we are no longer synthesizing a placeholder if the declaration corresponds to a Swift definition. This also goes for swift-ide-test and will have an immediate effect for anyone using swift-ide-test and passing --enable-objc-forward-declarations. I think swift-ide-test and the compiler should be as consistent with one another as possible, so this makes sense, but I wanted to make sure to call out it is possible we break something here, but only for clients forward declaring Swift types.

I previously voiced some concern about this implementation allowing users to break previously working code by importing a new Swift module:

Drawbacks to consider. Importing new Swift modules will then have the ability to break previously working code. Maybe justly so, but I'm sure users will find this confusing.

Tony's reply to my concern:

Regarding the last point, I don't think that breakage would occur in practice because forward-declaring a Swift @objc class already shouldn't be expected to work. As an example, let's say Swift module A defines an @objc class, and Clang module B only forward declares that class and has some API that references it. Even if Swift module C that imports both A and B, the APIs in B that refer to A won't work, so anyone trying to forward-declare a Swift class in Obj-C is already putting their build in a fragile and unreliable state.

I'm not trying to advocate for forward declaring Swift types as a supported practice, but I do want to call out that I think this breakage can occur in practice. Firstly, Clang module B is usable by Objective-C clients without issue, and anecdotally that is where we run into most forward declaration issues (ie. only Objective-C clients used the interface before and had no problems with forward declarations, then a Swift client arrives and has problems). Even if clients shouldn't expect it to work, unfortunately it has worked for a long time, so I don't think its unlikely for clients to have working code on the ground doing this.
If Swift module C imports only Clang module B, after this patch the APIs will work, since the compiler thinks the forward declarations refer to Clang definitions. It will only break once Swift module A is imported. So it is possible a Swift client starts using a Clang module that forward declares Swift types, and everything works for some time until they import the complete definition of that type. That said, I'm not overly worried about this since I think its relatively uncommon and easy to fix.
I'm comfortable with both these caveats, and I don't see a better solution, but I wanted to make them explicit for others so that there are no surprises down the line.
cc: @allevato @beccadax @drodriguez @plotfi

I looked over the patch once myself and once with Nuri. Overall this PR looks good to me, and the set of included test cases looks very goods.
However I am not the code owner, could Nuri please get a re-review for this PR please? Thanks
@beccadax @drodriguez @zoecarver @allevato @hyp

@swift-ci Please test

Hi @allevato @beccadax,
With the Swift 5.9 branch cut quickly approaching on March 20th, we'd like to merge this in time for the release. The implementation hasn't changed for a month and if no new concerns arise, I intend on merging in the next week. If concerns crop up afterwards, I'll be available to fix them.
That said, @DougGregor it seems you are the 5.9 release manager for the Swift compiler. If you have the time, I'd appreciate a review; an approval from the Apple side before merging would be preferred.

@swift-ci Please test

@swift-ci Please test source compatibility

@swift-ci Please test source compatibility

@swift-ci Please test source compatibility


Package update to support ROCm upgrade

Package names are formed as per the conventions.
ROCm version is appended to the version field when built by CI.
make target 'package' tries building deb, rpm, zip and tz.

@kiritigowda The package installs after doing a 'sudo apt --fix-broken install' due to missing miopen-opencl.

@kiritigowda The package installs after doing a 'sudo apt --fix-broken install' due to missing miopen-opencl.

Should the MIVisionX be allowed to install if miopen-opencl is NOT installed? If its so, need to remove the debian depends and rpm requires fields.

@kiritigowda The package installs after doing a 'sudo apt --fix-broken install' due to missing miopen-opencl.

Should the MIVisionX be allowed to install if miopen-opencl is NOT installed? If its so, need to remove the debian depends and rpm requires fields.

@pruthvistony Yes, MIVisionX has different components that can turn on or off depending on prereqs available on the system
With this approach, we can avoid having missing package errors.
Here is a table of MIVisionX prereqs and library- https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX#docker-image
Let me know what you think, I will disable explicit package requirements in favor of implicit package dependencies.

Merging this PR to update the CMakeLists.


Azure Datalake Gen2 Rename File Issue

azure.storage.filedatalake:
**12.0.0.b **:
Windows:
3.73:

Describe the bug
When trying to get azure.storage.filedatalake rename_file method working for an existing file_client I receive the following error:
file_client.rename_file(file_client.file_system_name+'/'+target_path) azure.core.exceptions.ResourceNotFoundError: Operation returned an invalid status 'The parent directory of the destination path does not exist.' ErrorCode:RenameDestinationParentPathNotFound error:{'code': 'RenameDestinationParentPathNotFound', 'message': 'The parent directory of the destination path does not exist.\nRequestId:889d285a-601f-001d-3afc-d9ef4b000000\nTime:2020-02-02T19:11:34.7429024Z'}
Provided is my code snippet:
-Creating a file_client for an existing file
-Creating target path name by taking the file_system name and appending it to the full path of the new file
                logger.info("Now loading file: {0} into it's corresponding raw directory: {1}".format(filename, curated_path))                 file_client = self.datalake_conn.file_system.get_file_client(filename)                 target_path = self.datalake_conn.file_system_name+'/'+curated_path+filename.split('/')[1]                 file_client.rename_file(target_path)

Hi @markpearl
Thanks for reaching out!
I think the problem is you didn't create a curated_path, rename will not help you create the path

@xiafu-msft are you able to provide me with the a small sample on how to use rename_file()? There's nothing for it in the samples folder. I saw the unit tests you created for it, but was able to replicate their behavior. Would be extremely useful if you could show the steps!
i.e. 1) create_file_client for target path 2) ..

Hi @markpearl ,
Here are the steps on how to use rename_file, your question appears in step3.:
Step 1, create a DataLakeServiceClient Object.
Step 2, get file client.
step 3, create target path.
step 4, rename file.
The detailed code is shown below for how to use rename_file (here is the official  sample ):
from azure.storage.filedatalake import DataLakeServiceClient
account_name = 'AccountName'
account_key = 'AccountKey'
# Step 1, create a DataLakeServiceClient Object.
dsc = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format(
       "https",
       account_name
   ), credential=account_key)
# step 2, get file client.
file_client=dsc.get_file_client(file_system='FileSystem', file_path='FolderName/YourFileName')
# step 3, create target path.
target_path=file_client.file_system_name + '/' + file_client.path_name.split('/')[0]+"/"+"NewFileName"
# step 4, rename file.
new_file_client = file_client.rename_file(target_path)

@jongio

Hi @markpearl ，
How is this issue going? Feel free to let us know if further help is needed.

Hi @markpearl
Sorry about the late response. Based on your code, I think you just didn't create the original file that you want to rename. Would you like to try the code below(which is based on your existing code) and see if it's working.
file_client = self.datalake_conn.file_system.get_file_client(filename)
target_path = self.datalake_conn.file_system_name+'/'+curated_path+filename.split('/')[1]
file_client.create_file()
file_client.rename_file(target_path)

Hi @xiafu-msft
I'm doing some development with this SDK and Azure Functions. I've noticed that the file_client.rename_file method fails if there are spaces in the source file name.
If there are spaces in the source file name (the one for which you get the file_client and execute the rename_file method) you get the: Operation returned an invalid status 'The source URI is invalid.' error.
If you take the spaces out, it works fine. I notice that having spaces in the destination file name (the one you are renaming to) works fine.
Hope this makes sense - it may be a separate bug and I may have put this in the wrong place...if so, sorry, I'm new to raising bugs here :)

Hi @JADawson
Sorry that I just noticed you comments under this open issue! Please feel free to create a new one next time!
And you are right this is a bug in SDK, while it's fixed in the most recent release! We are appreciated that you reported this!
Thanks again

close this issue for now, feel free to reopen it if you have any question


JIT access to AKS

Hello,
Are their any plans to extend JIT access to support access to the api server when running AKS?
Many thanks,
Doug

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 25f0758b-8274-d2b5-4702-2c7ca6b0b14a
Version Independent ID: d1215107-abf9-fefd-a63b-b20ec3f7f744
Content: Just in time virtual machine access in Azure Security Center
Content Source: articles/security-center/security-center-just-in-time.md
Service: security-center
GitHub Login: @TerryLanfear
Microsoft Alias: terrylan

@dougbw Thanks for your feedback! We will investigate and update as appropriate.

@dougbw We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

When VM is deleted, we can still see the entry in JIT and because of that, we can't remove JIT rule in NSG rules.
we can delete VM entry in JIT only via portal. As part of automation, we are in need of PS script to delete the entry from Security Center - Just in time VM access window. can you help us with script to remove VM entry.

@SaurabhSharma-MSFT can you have look at my query and confirm ?


Update the RFC process to include drafts

Motivation
Sometimes we get RFC number conflicts when there are multiple open RFC pull requests.
Solution

Make RFC PRs in rfcs/drafts/xxxx-rfc-name.md
Assign them a number when they merge

Review
@dconnolly @oxarbitrage this is a RFC process change based on the new drafts folder.
Related Issues
For example 0006-stolon.md in PR #1006 conflicts with https://github.com/ZcashFoundation/zebra/blob/main/book/src/dev/rfcs/0006-contextual-difficulty.md

Not merging so as to allow @oxarbitrage have a look

Not merging so as to allow @oxarbitrage have a look

Ah yes @oxarbitrage is ooo so, merging


cmd+k type interface to easily select which providers to use

I find myself having to switch providers a lot. Preplexity/bing/bard when I need search. GPT/Claude for more normal stuff. This will only get more complex over time.
I'd wanna build a cmd+k type interface that lets you do this easily. Maybe there's an easier way to do this with just a bar at the top that's super slim with checkboxes on the side. If people like this, I can make this pretty quickly.

Yeah, I was thinking today that it would be great to switch between coding-related side and life-related :) especially since phind.com is done in #87 . I'm not sure what the solution for that would be. some kind of a switch with a keyboard would be nice

@fardeem sorry for delayed response - mind doing a wireframe mock of what this would look like? cant quite see it in my head

isnt that pretty close to the menubar based approach we have today? also does it let us toggle between sets of providers (eg work vs life) quickly? like i am wondering if maybe what we really want is profiles, and each profile has a set list of providers

I agree with @swyxio, I was thinking something more in lines of profiles.
It might be an overkill though, for me this is mostly turning the phind off and on. And only because it has a limited number of messages you can send to it, otherwise I probably wouldn't even bother.

Hmmm - switching between providers within the menubar is a little hard because you as soon as you click on a provider, the menu disappears.
What if we tried something like this where we add a settings icon, and when you click on it, it shows a list of just the providers. That way people can easily turn/on off a bunch of providers at once.

@fardeem i would be open to that. want to prototype? (doesnt have to look nice, just want to get a feel for the UX)

Yessir will get to it this weekend

I agree with @fardeem. If there is something like an interface listing all the providers, that will be great and intuitive to modify which provider is going to display or hide.

@fardeem we are actively working on it in #116  - best not to do now until we are done

its implemented now, the UX could be improved but it works

SUPER COOL!


Development stopped?

I was looking for exactly this kind of generator. Sad to know it isn't developed anymore 🙁 Can you suggest alternative similar to this.

You don't need an alternative, as long as this one works well (and it does). I have just made a fork of this repo, just in case that some day it is deleted, and I have used it in my project. I suggest that you do the same.

@kskarthik , have you tried nikola?


Catch the easy fix

In this example new_file_9.nwt.txt, we get pd10109 and pd10110 errors which indicate a symmetric error (like in the case of pd10101 and pd10102) and it is actually caused by the reverse connection of the modulation arc to its source and target nodes. Here, while swapping the source and target nodes resolves both errors at the same time, we only change the source to the closest EPN and leave the target with an error.
In case of this symmetric errors pd10109 and pd10110, we can apply the same approach with pd10101 and pd10102 and first try to swap source and target if the same edge is causing both errors.

Moving this to #31 as future improvement.


Karate Tests Stuck on Running Forever

We have currently about 1000 test features. We start to face that tests are just stuck while running them in parallel and would not proceed
I have upgraded the karate version 0.9.5.RC3 but still I am facing an issue.
Cc: @ptrthomas

duplicate of #1216 you are using a very old version, please use 0.9.6.RC4


ConfigFile description text is for ConfigGroup

File: docs/reference/pkg/kubernetes/yaml/configfile.md

This doesn't appear to repro any more - I assume this was fixed.


Add documentation on OVN BGP agent setup with EVPN

Relates to https://github.com/SovereignCloudStack/issues/issues/614

LGTM :-)
We should consider whether the “hardware-landscape” repository is the right place for this documentation as it is not directly related to this repo.
@maxwolfs What do you think is an appropriate place for this document?

This documentation describes the development status for the SDN encyrption. As you can see, there are currently some Openstack change requests waiting to be integrated into Kolla-Ansible.
So that this can be tracked, it makes sense to create a new menu item ‘Technical Previews’ below https://docs.scs.community/docs/category/iaas-layer where this document is then stored.
(https://github.com/SovereignCloudStack/docs/tree/main/docs/02-iaas)


fix(solc): do not overwrite existing cache

previously if 1 file changed, it'd overwrite the existing cache on disk with just
that 1 changed file. this change reads the cache from disk and merges it with the new checksums
ref: https://github.com/gakonst/ethers-rs/pull/623

Something minor to note here is that deleted files will remain in the cache metadata file.

Wonder what's the best way to approach this to have a robust cache file


templates should only be imported explicitly

When using angular2-compilers templates get implicitly imported without the import statement.  Example on this commit.  https://github.com/trajano/meteor-boilerplate/commit/bb71a20d716e316d50c4fdbf5878f605b37e2c1a
This is both good and bad.  Good that it reduces one line of code I have to do each, bad that it does not provide a good migration path from previous angular-templates that require it.  In fact if will complain that there is no module found for the template.

Fixed here https://github.com/Urigo/angular2-meteor/commit/84f6490eca9f942555571a50926731ea3b7fa074, will be in the next version

Thanks, hope it gets released soon, at the moment I am getting the error on https://github.com/trajano/meteor-boilerplate/blob/angular2/imports/ui/components/meteorSample.component.js
because import templateUrl from './meteorSample.html' will fail in that ./meteorSample.html is not found.

published a new version

Just tested, the export didn't work as expected
Error: [$http:badreq] Http request configuration url must be a string.  Received: {"default":"imports/ui/states/home/main.html"}

I'll try to switch it to the {} pattern. instead of the import templateUrl from './template.html'

Nope didn't work.  Putting in the original templateUrl with 'imports/...' still works
  templateUrl: 'imports/ui/states/home/main.html',

However, this also works
  templateUrl: templateUrl.default,

(Just went with the error I saw above).  Can it be fixed so it does not need that .default at the end?

I think if we add  exports.templateUrl = "${templateUrl}"; in https://github.com/Urigo/angular2-meteor/commit/84f6490eca9f942555571a50926731ea3b7fa074#diff-606781768ac540dde840ff73e50d5066R120 it wouild at least allow us to use the {} form.

We could change exports.default to module.exports. This way we:
could use a require function:
@Component({
  selector: 'second-meteor-sample',
  templateUrl: require('./secondMeteorSample.html')
})

or an import statement:
import * as templateUrl from './secondMeteorSample.html';
@Component({
  templateUrl,
  selector: 'second-meteor-sample'
})

@trajano , I just moved my app to use templateUrl: '/imports/...' instead of template: <inline html>.
I noticed that saving the referenced html file, does not trigger a rebuild. Is this because I need to declare it differently or import it?  Is there a best practice for importing and which versions is it imported in?

@kokokenada the recommended usage would be to use template rather than templateUrl according to one of @Urigo comments (just can't seem to find it at the moment)


Compile error

I've been trying to use moor in both mobile and web platform and I can't compile mobile platform while web is fine.
Would appreciate any help.
Thanks!
pubspec.yaml
name: flutter_web_app
description: A new Flutter application.

version: 1.0.0+1

environment:
  sdk: ">=2.2.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  moor: ^2.0.0
  moor_flutter: ^2.0.0

dev_dependencies:
  moor_generator: ^2.0.0
  build_runner:
  flutter_test:
    sdk: flutter

flutter:

  uses-material-design: true

database.dart
import 'dart:core';

import 'package:moor/moor.dart';
import 'package:moor_flutter/moor_flutter.dart';
import 'package:moor/moor_web.dart';

part 'database.g.dart';

@DataClassName("UserEntry")
class User extends Table {
  @override
  String get tableName => "user";

  @override
  Set<Column> get primaryKey => {id};

  @JsonKey("UserId")
  TextColumn get id => text()();

  @JsonKey("Compid")
  TextColumn get compId => text()();

  @JsonKey("CompanyName")
  TextColumn get compName => text()();

  @JsonKey("UserName")
  TextColumn get userName => text()();

  @JsonKey("TreeNo")
  TextColumn get treeNo => text()();

  @JsonKey("Grants")
  TextColumn get grants => text()();

  @JsonKey("Admin")
  TextColumn get admin => text()();

  @JsonKey("WrkWhs")
  TextColumn get wrkWhs => text()();

  @JsonKey("WhsCode")
  TextColumn get whsCode => text()();

  @JsonKey("UserType")
  TextColumn get userType => text()();

  @JsonKey("Return")
  TextColumn get isReturn => text()();
}

@UseMoor(tables: [User],
    queries: {
      '_deleteUser': 'DELETE FROM user'
    })
class MyDatabase extends _$MyDatabase {
  MyDatabase(QueryExecutor e)
      : super(e);

  @override
  int get schemaVersion => 3;

  @override
  MigrationStrategy get migration =>
      MigrationStrategy(onUpgrade: (Migrator m, int from, int to) async {
        for (var table in allTables) {
          await m.deleteTable(table.actualTableName);
          await m.createTable(table);
        }
      });

  Future<UserEntry> getUser() => select(user).getSingle();

  Future<int> insertUser(UserEntry entry) {
    return into(user).insert(entry);
  }

  Future<int> deleteUser() {
    return _deleteUser();
  }
}

main.dart
import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:moor/moor_web.dart' as moor_web;
import 'package:moor_flutter/moor_flutter.dart' as moor_flutter;

import 'database.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  MyDatabase _database;
  String userId = "";

  @override
  Widget build(BuildContext context) {
    _database ??= kIsWeb
        ? MyDatabase(moor_web.WebDatabase('app'))
        : MyDatabase(moor_flutter.FlutterQueryExecutor.inDatabaseFolder(
            path: 'db.sqlite'));

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text("User id: $userId"),
            RaisedButton(
              child: Text("Login"),
              onPressed: () {
                final response = """
                [{"UserId":"1234","Compid":"null","CompanyName":"null","UserName":"null","TreeNo":"null","Grants":"null","Admin":"null","WrkWhs":"null","WhsCode":"null","UserType":"null","Return":"2"}]
                """;
                final jsonArray = json.decode(response.toString());
                final user = UserEntry.fromJson(jsonArray[0]);

                _database.insertUser(user).then((_) {
                  setState(() {
                    userId = user.id;
                  });
                });
              },
            )
          ],
        ),
      ),
    );
  }
}

Logs
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Invalid depfile: /Users/eitanaflalo/FlutterProjects/flutter_web_app/flutter_web_app/.dart_tool/flutter_build/c73eb6e8efe1ae8bbac2c6b31365eadf/kernel_snapshot.d
Invalid depfile: /Users/eitanaflalo/FlutterProjects/flutter_web_app/flutter_web_app/.dart_tool/flutter_build/c73eb6e8efe1ae8bbac2c6b31365eadf/kernel_snapshot.d

Compiler message:
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/moor_web.dart:9:8: Error: Not found: 'dart:html'
import 'dart:html';
       ^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:2:8: Error: Not found: 'dart:js'
import 'dart:js';
       ^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:42:9: Error: Type 'JsObject' not found.
  final JsObject _obj;
        ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:57:3: Error: Type 'JsObject' not found.
  JsObject _createInternally(Uint8List data) {
  ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:70:9: Error: Type 'JsObject' not found.
  final JsObject _obj;
        ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:122:9: Error: Type 'JsObject' not found.
  final JsObject _obj;
        ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/web_db.dart:125:17: Error: The getter 'window' isn't defined for the class '_WebDelegate'.
 - '_WebDelegate' is from 'package:moor/moor_web.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/moor_web.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
    final raw = window.localStorage[_persistenceKey];
                ^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/web_db.dart:136:7: Error: The getter 'window' isn't defined for the class '_WebDelegate'.
 - '_WebDelegate' is from 'package:moor/moor_web.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/moor_web.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
      window.localStorage[_persistenceKey] = binStr;
      ^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/web_db.dart:149:10: Error: The getter 'window' isn't defined for the class '_WebVersionDelegate'.
 - '_WebVersionDelegate' is from 'package:moor/moor_web.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/moor_web.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
    if (!window.localStorage.containsKey(_versionKey)) {
         ^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/web_db.dart:152:24: Error: The getter 'window' isn't defined for the class '_WebVersionDelegate'.
 - '_WebVersionDelegate' is from 'package:moor/moor_web.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/moor_web.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
    final versionStr = window.localStorage[_versionKey];
                       ^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/web_db.dart:159:5: Error: The getter 'window' isn't defined for the class '_WebVersionDelegate'.
 - '_WebVersionDelegate' is from 'package:moor/moor_web.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/moor_web.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
    window.localStorage[_versionKey] = version.toString();
    ^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:19:8: Error: Getter not found: 'context'.
  if (!context.hasProperty('initSqlJs')) {
       ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:26:4: Error: Getter not found: 'context'.
  (context.callMethod('initSqlJs') as JsObject)
   ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:26:39: Error: 'JsObject' isn't a type.
  (context.callMethod('initSqlJs') as JsObject)
                                      ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:37:53: Error: 'JsObject' isn't a type.
  _moduleCompleter.complete(SqlJsModule._(module as JsObject));
                                                    ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:42:9: Error: 'JsObject' isn't a type.
  final JsObject _obj;
        ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:50:7: Error: The getter 'context' isn't defined for the class 'SqlJsModule'.
 - 'SqlJsModule' is from 'package:moor/src/web/sql_js.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'context'.
      context['db'] = dbObj;
      ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:58:45: Error: 'JsFunction' isn't a type.
    final constructor = _obj['Database'] as JsFunction;
                                            ^^^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:61:14: Error: The method 'JsObject' isn't defined for the class 'SqlJsModule'.
 - 'SqlJsModule' is from 'package:moor/src/web/sql_js.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart').
Try correcting the name to the name of an existing method, or defining a method named 'JsObject'.
      return JsObject(constructor, [data]);
             ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:63:14: Error: The method 'JsObject' isn't defined for the class 'SqlJsModule'.
 - 'SqlJsModule' is from 'package:moor/src/web/sql_js.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart').
Try correcting the name to the name of an existing method, or defining a method named 'JsObject'.
      return JsObject(constructor);
             ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:70:9: Error: 'JsObject' isn't a type.
  final JsObject _obj;
        ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:75:54: Error: 'JsObject' isn't a type.
    final obj = _obj.callMethod('prepare', [sql]) as JsObject;
                                                     ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:86:16: Error: The getter 'JsArray' isn't defined for the class 'SqlJsDatabase'.
 - 'SqlJsDatabase' is from 'package:moor/src/web/sql_js.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'JsArray'.
    final ar = JsArray.from(args);
               ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:101:71: Error: 'JsArray' isn't a type.
        .callMethod('exec', const ['SELECT last_insert_rowid();']) as JsArray;
                                                                      ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:102:34: Error: 'JsObject' isn't a type.
    final row = results.first as JsObject;
                                 ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:103:36: Error: 'JsArray' isn't a type.
    final data = (row['values'] as JsArray).first as JsArray;
                                   ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:103:54: Error: 'JsArray' isn't a type.
    final data = (row['values'] as JsArray).first as JsArray;
                                                     ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:122:9: Error: 'JsObject' isn't a type.
  final JsObject _obj;
        ^^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:127:30: Error: The getter 'JsArray' isn't defined for the class 'PreparedStatement'.
 - 'PreparedStatement' is from 'package:moor/src/web/sql_js.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'JsArray'.
    _obj.callMethod('bind', [JsArray.from(args)]);
                             ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:137:38: Error: 'JsArray' isn't a type.
    return _obj.callMethod('get') as JsArray;
                                     ^^^^^^^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/moor-2.0.1+1/lib/src/web/sql_js.dart:143:50: Error: 'JsArray' isn't a type.
    return (_obj.callMethod('getColumnNames') as JsArray).cast<String>();
                                                 ^^^^^^^
../../../development/flutter/packages/flutter/lib/src/painting/_network_image_web.dart:64:12: Error: Method not found: 'webOnlyInstantiateImageCodecFromUrl'.
    return ui.webOnlyInstantiateImageCodecFromUrl(resolved); // ignore: undefined_function
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
#0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
#1      asFileUri (package:vm/kernel_front_end.dart:555:37)
<asynchronous suspension>
#2      writeDepfile (package:vm/kernel_front_end.dart:745:21)
<asynchronous suspension>
#3      FrontendCompiler.compile (package:frontend_server/frontend_server.dart:452:15)
<asynchronous suspension>
#4      _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:38:22)
<asynchronous suspension>
#5      starter (package:flutter_frontend_server/server.dart:149:27)
<asynchronous suspension>
#6      main (file:///b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30)
<asynchronous suspension>
#7      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Exception: Errors during snapshot creation: null
#0      KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart:182:7)
<asynchronous suspension>
#1      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:526:25)
<asynchronous suspension>
#2      _BuildInstance.invokeTarget.<anonymous closure> (package:flutter_tools/src/build_system/build_system.dart:481:35)
#3      new Future.sync (dart:async/future.dart:222:31)
#4      AsyncMemoizer.runOnce (package:async/src/async_memoizer.dart:43:45)
#5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:481:21)
<asynchronous suspension>
<asynchronous suspension>
#6      BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:419:36)
<asynchronous suspension>
#7      buildWithAssemble (package:flutter_tools/src/bundle.dart:125:48)
<asynchronous suspension>
#8      BundleBuilder.build (package:flutter_tools/src/bundle.dart:75:11)
<asynchronous suspension>
#9      BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:126:25)
<asynchronous suspension>
#10     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:557:18)
<asynchronous suspension>
#11     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:457:33)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:157:29)
<asynchronous suspension>
#13     _rootRun (dart:async/zone.dart:1124:13)
#14     _CustomZone.run (dart:async/zone.dart:1021:19)
#15     _runZoned (dart:async/zone.dart:1516:10)
#16     runZoned (dart:async/zone.dart:1463:12)
#17     AppContext.run (package:flutter_tools/src/base/context.dart:156:18)
<asynchronous suspension>
#18     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:446:20)
#19     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#20     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:416:21)
<asynchronous suspension>
#21     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:157:29)
<asynchronous suspension>
#22     _rootRun (dart:async/zone.dart:1124:13)
#23     _CustomZone.run (dart:async/zone.dart:1021:19)
#24     _runZoned (dart:async/zone.dart:1516:10)
#25     runZoned (dart:async/zone.dart:1463:12)
#26     AppContext.run (package:flutter_tools/src/base/context.dart:156:18)
<asynchronous suspension>
#27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:367:19)
<asynchronous suspension>
#28     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#29     new Future.sync (dart:async/future.dart:222:31)
#30     CommandRunner.run (package:args/command_runner.dart:112:14)
#31     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:251:18)
#32     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
<asynchronous suspension>
#33     _rootRun (dart:async/zone.dart:1124:13)
#34     _CustomZone.run (dart:async/zone.dart:1021:19)
#35     _runZoned (dart:async/zone.dart:1516:10)
#36     runZoned (dart:async/zone.dart:1500:12)
#37     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#38     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:157:29)
<asynchronous suspension>
#39     _rootRun (dart:async/zone.dart:1124:13)
#40     _CustomZone.run (dart:async/zone.dart:1021:19)
#41     _runZoned (dart:async/zone.dart:1516:10)
#42     runZoned (dart:async/zone.dart:1463:12)
#43     AppContext.run (package:flutter_tools/src/base/context.dart:156:18)
<asynchronous suspension>
#44     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
<asynchronous suspension>
#45     run (package:flutter_tools/runner.dart:50:10)
#46     main (package:flutter_tools/executable.dart:65:9)
<asynchronous suspension>
#47     main (file:///Users/eitanaflalo/development/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#48     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#49     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Failed to build bundle.

FAILURE: Build failed with an exception.

* Where:
Script '/Users/eitanaflalo/development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 782

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebugX86'.
> Process 'command '/Users/eitanaflalo/development/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Finished with error: Gradle task assembleDebug failed with exit code 1

The compiler will still try to pull in everything that's in an import, even if it's never used. The setup from this repo should give a good overview on how to use moor across platforms. Basically, you only depend on the moor package in shared code (not moor_flutter, not moor/web.dart). Then, you can extract the code that creates the QueryExecutor in another file (one for each platform) and use conditional exports to glue everything together.

@simolus3 Thank you for your answer, it worked perfectly!
I have now another error I'm getting on Chrome console which prevents my app working properly.
I'm trying to get the user from the database with the following code:
final user = await _database.getUser();

And I'm getting the following error and the rest of the code won't execute:
js_primitives.dart:30
errors.dart:145 Uncaught (in promise) Error: Bad state: Expected exactly one result, but found more than one!
    at Object.throw_ [as throw] (errors.dart:194)
    at SimpleSelectStatement.new.getSingle (query.dart:116)
    at getSingle.next (<anonymous>)
    at onValue (async_patch.dart:45)
    at _RootZone.runUnary (zone.dart:1379)
    at _FutureListener.thenAwait.handleValue (future_impl.dart:137)
    at handleValueCallback (future_impl.dart:678)
    at Function._propagateToListeners (future_impl.dart:707)
    at _Future.immediate.[_completeWithValue] (future_impl.dart:522)
    at async._AsyncCallbackEntry.new.callback (future_impl.dart:552)
    at Object._microtaskLoop (schedule_microtask.dart:41)
    at _startMicrotaskLoop (schedule_microtask.dart:50)
    at async_patch.dart:166

Is it by any change related to moor?
P.S. I'm using Provider

This is likely a bug in your application. You're probably using something like select(users).getSingle() in the implementation of getUser(). For getSingle() to work, the select statement must not return more than one row. Can you check whether more than one user could be in the database at the same time? If that should be possible, you probably want a list of users without getSingle. Otherwise, you would probably have to check for inserts and see what's causing more than one user to be written.

I have same issue. I am not even using moor_web or something.

Okay, I tried thousands of times flutter upgrade/pub get and etc. But in my case, the problem was in files where I imported ACCIDENLY packages that depend on flutter_web_plugins. The packages that depend on it usually have the name web/cloud so if you are using vscode just query in your files "web" or "cloud" or "dart:html/dart:js"  . and remove it. In my case, it was "import "cloud_firestore_web"". removing that line solved my problem.

@mqhamdam hey, some people say dart:html need to be removed and some say dart:js must be removed based on what we will get to know what is to be removed?


minSdkVersion too high

why and is it possible to set it to something lower, like maybe 19?

@brucexia their support reply to me saying you can use the fcm branch by including the library in your project. when you do so, you'll notice that the build.gradle doesn't have the configuration needed to be included in this way.
If you managed to refactor the build.gradle file please share.
thanks

Yeah, what the hell? Who writes a library with a minSdk of 24?!


Update

fixed issue regarding htpynewlam
I'm now using Julia logging @info and so on
using latex in the inline docs now
added Orthogonal Matching Pursuit(OMP)
added Basis Pursuit Denoising(BPDN)

@cortner @mpf Could you please check and see if the changes I've made address the issues you've opened?

Then this should be ready to merge and register?

maybe not quite. The readme still needs at least an example.

@cortner I just updated readme. :)

Fixes #7


Add STS regional endpoint when assuming role

Issue: I have my Kinesis Analytics Job in a VPC with no internet connection. When assuming a role from another AWS account, I'm getting a timeout error because the application tries to reach the global STS endpoint (sts.amazonaws.com) which requires Internet connection.
Instead, I would like to be able to use my regional VPC endpoint, but this is something not supported by the connector at the moment (agreed by the Service Team).
Description of changes:  I'm adding a regional VPC endpoint in the credentials provider when setting up the client STS client, based on the region specified by the consumer.

@0xNacho thank you for the contribution. I was under the impression that your application is using Apache Flink 1.13. FYI, this repository targets Apache Flink 1.8 and 1.11, we recommend to use the Apache Flink connector for later versions.
That being said, this contribution is welcome, I will get it merged. If you are happy to upstream to Apache Flink too I can help you merge that, if not we can handle the upstreaming to Flink 1.13+

@dannycranmer  Was this merged ? I'm also looking at the same issue where we need the sts vpc endpoint


Update App.jsx

testing the changes to open and close the sidemenu bar to close when selected a category after displaying the filter changes

There seems to be some error , resolve it @Saqlain-qark


summary added for Metadata Subgroup Call D

IMO, someone other than Legendary Requirements personnel should review and merge these notes. @okwme @ig-shaun @deepanshutr

IMO, someone other than Legendary Requirements personnel should review and merge these notes. @okwme @ig-shaun @deepanshutr

I fixed the merge. It should be ready for review.

I fixed the merge. It should be ready for review.

@deepanshutr The formatting of the earlier calls was broken because when the markdown gets translated into html, we lost the outline formatting. The html approach fixes that.

@deepanshutr The formatting of the earlier calls was broken because when the markdown gets translated into html, we lost the outline formatting. The html approach fixes that.

@jandrieu as mentioned in the closing comments on the issue https://github.com/interNFT/documentation/issues/22 , the build failure occurred because some of the list HTML tags were not closed. This might have been missed in the review because HTML is a little arcane to review as text. Markdown is a lot easier to read and review, hence have removed HTML formatting from all other markdowns as well. Requesting this PR to adhere to markdown formatting too.

@jandrieu as mentioned in the closing comments on the issue https://github.com/interNFT/documentation/issues/22 , the build failure occurred because some of the list HTML tags were not closed. This might have been missed in the review because HTML is a little arcane to review as text. Markdown is a lot easier to read and review, hence have removed HTML formatting from all other markdowns as well. Requesting this PR to adhere to markdown formatting too.

@deepanshutr We can fix html problems. However, the garbling of markdown to html, as you can see on the first call record, is out of my control without using HTML. Markdown lists do not translate to HTML with this build system and pre-formatted lists leverages neither the benefits of markdown nor html.
For now, I believe the best option for good formatting is using html as you see in the calls we've handled.
If you'd like to take on the task of correcting and maintaining the summary, we'd be happy to hand that over.
@ig-shaun Do you have a preference?

@deepanshutr We can fix html problems. However, the garbling of markdown to html, as you can see on the first call record, is out of my control without using HTML. Markdown lists do not translate to HTML with this build system and pre-formatted lists leverages neither the benefits of markdown nor html.
For now, I believe the best option for good formatting is using html as you see in the calls we've handled.
If you'd like to take on the task of correcting and maintaining the summary, we'd be happy to hand that over.
@ig-shaun Do you have a preference?

@jandrieu the formatting for the calls you've handled has been changed from HTML to markdown too, hope there are no gaps in the formatting. Will be happy to take up the maintenance of the text.

@jandrieu the formatting for the calls you've handled has been changed from HTML to markdown too, hope there are no gaps in the formatting. Will be happy to take up the maintenance of the text.

Ok. We can use that pattern. We'll clean up the old ones with the markdown that fails to survive to html.

Ok. We can use that pattern. We'll clean up the old ones with the markdown that fails to survive to html.


schedule.html: remove schedule-navigator node

Please don't remove the nav bar - it's the only way to access the links to the days and the (more important): the personal schedule.

Ok. This was requested by someone else. No need to merge.


vagrant up: TASK [geerlingguy.drush : Install Drush.]. HTTP Error 404: Not Found

Issue Type

Bug Report / Support Request

Your Environment
Vagrant 1.9.1
VirtualBox 5.1.14r112924
ansible <IP_ADDRESS>
  config file =
  configured module search path = Default w/o overrides

Your OS

macOS (10.12.3)

Full console output
TASK [geerlingguy.drush : Install Drush.] **************************************
fatal: [crape]: FAILED! => {"changed": false, "dest": "/usr/local/bin/drush", "failed": true, "msg": "Request failed", "response": "HTTP Error 404: Not Found", "state": "absent", "status_code": 404, "url": "https://github.com/drush-ops/drush/releases/download/8.x/drush.phar"}
to retry, use: --limit @/vagrant/provisioning/playbook.retry
PLAY RECAP *********************************************************************                      : ok=134  changed=1    unreachable=0    failed=1
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
Summary
https://github.com/drush-ops/drush/releases/download/8.x/drush.phar is not found while running vagrant up on a fresh install.

You'll need to update the drush_version variable in your config.yml
drush_version: "8.1.10"

Or simply remove it and let the default from default.config.yml take effect.

Fixed. Thanks!


Add Searching Algorithms in any Language

Only add Algorithms which are not already present in the repository.

I want to add binary search in python.

I will add linear search in C

i want to add Binary search in C

Added Jump search in python #63

i would like to binary search in c

Added Jump Search in Java

i would like to add Jump Search in c++

i would like to add insertion sort in c

I Would Like to add Linear Search in C++

Would love to add search algorithm in Golang let me know if that is still a option

Iwould love to add bubble sort

I would love to add bubble sort


Feat merkle proof

Adding MerkleProof comparison for OZ and Solady libs

Hey! @ecivini I finally checked your commit and added results to the table. Please recheck it and merge it to main, if everything is fine. Thanks!


Faster

Make one checker per-file. Fixes #81
Do not store hash for stdin.
Annotate more types.
Make exit codes more diverse.
Add compatibility note into README right after features.

And we're amazing again!
python3 -m flakehell lint --format=json  2.77s user 0.17s system 111% cpu 2.638 total
python3 -m flake8 --format=json  48.94s user 1.80s system 789% cpu 6.427 total

We should consider adding benchmarks and test for regressions :thinking:


Forward back buttons

Implemented forward and back buttons on hosts, hosts services and issues pages. This is implemented with next and prev routes within the router.
The next/prev hotkey code was refactored to reduce redundancy. This code could probably be reworked again to make use of the new routing logic.
Suggestions are welcome how to remove any redundant code or improve the UI components.

Left over debugging console.log statements removed.

This commit will hopefully resolve issue #75


gnome3.gnome-getting-started-docs: 3.30.0 -> 3.31.91

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/gnome-getting-started-docs/versions.
meta.description for gnome3.gnome-getting-started-docs is: '"Help a new user get started in GNOME"'.

Checks done (click to expand)

built on NixOS

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 3.31.91 with grep in /nix/store/361a17rwc951cflj850q0v4bpwqqan40-gnome-getting-started-docs-3.31.91

directory tree listing: https://gist.github.com/dad377cfbb9c93b11594197897c21cf6

du listing: https://gist.github.com/30099c905925e4a75108bb0d2dbb78a5

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)
1 package rebuild(s)
1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
0 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
gnome3.gnome-getting-started-docs

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/361a17rwc951cflj850q0v4bpwqqan40-gnome-getting-started-docs-3.31.91 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A gnome3.gnome-getting-started-docs https://github.com/r-ryantm/nixpkgs/archive/f63c92393230d4a1d10bdda0be27f2f9729f29a8.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/361a17rwc951cflj850q0v4bpwqqan40-gnome-getting-started-docs-3.31.91
ls -la /nix/store/361a17rwc951cflj850q0v4bpwqqan40-gnome-getting-started-docs-3.31.91/bin

cc @lethalman @jtojnar @hedning @worldofpeace for testing.

unstable

When closing due to incorrect repology rule, do not forget to report it like this: https://repology.org/project/gnome-getting-started-docs/report


3 months ago Polish translations were reverted to incorrect forms

Please undo the last commit of the file lang/pl.php
In Polish language in dates the name of the month must be in Genitive case.
Please refer  to theseEnglish sources:
http://www.mediawiki.org/wiki/Template:I18n_month
http://stackoverflow.com/questions/17188316/month-name-in-genitive-polish-locale-with-joda-time-datetimeformatter
Additional remark:
Is it possibe to somehow lock the file against disrupting changes? This is the second time I need to manually downgrade your package to version which displays month names properly. Maybe we could put a remark in a comment inside  of the file?

@UnrulyNatives I guess some users use Jenssegers in sentences where months are not in Genitive. So for them, you fix break their workflows.
So what we really need to do is providing a way to apply the Nominative/Genitive dynamically as moment.js do:
https://github.com/moment/moment/blob/develop/locale/pl.js
Can you check if moment.js function is right. Then if it is, please propose a pull-request to Carbon:
https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Lang/pl.php
Carbon 2 handle dynamic cases, for example, ru.php take months_standalone instead of months when the format (considered with the isoFormat() method pattern) matches the months_regexp:
https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Lang/ru.php#L169

I checked with moment.js and planned to do this:
https://github.com/kylekatarnls/Carbon/commit/4c167aa53618b5890ea8e0bb26d69e44a871a818
That would be the correct way to handle it. Else you will always have someone that get an incorrect result for his own case.

Fixed in 4.0.0.


Cleaning up resources

Is your feature request related to a problem? Please describe.
Cleaning up resources is showing to be a prevalent issue in regards to how we handle deletion idempotency.
The CSI spec states:
DeleteVolume

If a volume corresponding to the specified volume_id does not exist or the artifacts associated with the volume do not exist anymore, the Plugin MUST reply 0 OK.

DeleteSnapshot

If a snapshot corresponding to the specified snapshot_id does not exist or the artifacts associated with the snapshot do not exist anymore, the Plugin MUST reply 0 OK.

When DeleteVolume/Snapshot is being called, we're not deleting only the volume/snapshot, but also a number of other resources on which the volume/snapshot depends on. This means that any possible errors that may occur while performing the deletion may leave the volume/snapshot in an inconsistent state, where the already deleted resources would prevent deletion of the leftover resources due to Not Found errors (which should be treated as success).
Another case of this problem is described in https://github.com/ceph/ceph-csi/issues/192, where the volume is in fact deleted, but due to timeouts, all subsequent attempts to delete (an already deleted) volume fail, rendering the overall operation as a failure where it should have been a success.
Describe the solution you'd like
For deletion, Not Found errors are ought to be treated as success, but best effort should be made to delete all resources - returning immediately after Not Found might not be sufficient.
Example with csi-cephfs plugin:

First attempt for DeleteVolume RPC: volume is deleted fine, but deleting the dedicated ceph user takes too long, external-provisioner retries. After some time the operation fails because of connection failure and returns with error.
Second attempt: the plugin sees the volume doesn't exist - it shouldn't return success immediately but rather continue with the deletion.

@gman0 ,@rootfs  I think same applies for volume/snapshot create also. suppose volume creation succeed in ceph but failed to store the metadata, don't we end up in the same situation?
and currently, we delete the rbd volume and snapshot if storing metadata fails. do we need to delete the same? cant we retrieve the volume/snapshot based on the name?

@Madhu-1 not anymore, see https://github.com/ceph/ceph-csi/pull/201

@gman0 sorry i missed the recent change, Thanks :)

Fixed in #201


Rain widget behaving unexpected in Edge on Windows 10

Rain Widget scaling is not as expected and different from for instance Weatherstation, see image

I think it's expected. In your screenshot, the icon for the rain is larger because it scales with the widget, and you rain widget is taller than the weather widget. Try giving both widgets the same size and the icon should roughly be the same size (roughly because I think there is a discrepancy in the image/text space ratio used in these widgets).
Somewhere in the repo comments, we discussed topping the size of the icons to a max value, but the issue was never created.
Also note that the icon for rain gauge has changed recently :)

I will update to the latest version, I thought is was - this is on 0.1.6 but maybe I have to clear cache. Will try to make them equal in size and see.

Will probably be the same SVG issue as described in https://github.com/t0mg/reacticz/issues/61#issuecomment-277826594.

Reacticz 0.1.7 - new rain gauge icon - spacing seems a bit off , new screen dump :

Ok thanks. Looks like a CSS issue then, maybe some unsupported flexbox property.

About Flexbox cross browser - maybe this blog has some info https://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/, it also refers to a repo on Github with Flexbox issues

A screenshot with the new Rainmeter icon , just to be correct

This issue was moved to domoticz/Reacticz#5


Default disk size is too small for larger models (e.g. Transformers)

Issue
When deploying a pretrained model from Huggingface, in particular a model which is downloaded from Huggingface after the container has been setup, the default disk size of 10 Gi is too small and causes unexpected errors.
Possible Solution
In the terraform_default.tf file, we can change the boot_disk section from:
resource "google_compute_instance" "vm" {
  project                   = var.project_id
  name                      = "${var.deployment_name}-instance"
  machine_type              = var.machine_type
  zone                      = var.zone
  allow_stopping_for_update = true

  boot_disk {
    initialize_params {
      image = module.gce-container.source_image
    }
  }
  ...

to something like:
resource "google_compute_instance" "vm" {
  project                   = var.project_id
  name                      = "${var.deployment_name}-instance"
  machine_type              = var.machine_type
  zone                      = var.zone
  allow_stopping_for_update = true

  boot_disk {
    initialize_params {
      image = module.gce-container.source_image
      size = 20
    }
  }
  ...

However this may be a waste for most use cases. Another possibility is adding size to OPERATOR_SCHEMA in operator_config.py or just updating the README to instruct the user to set the size if they are encountering problems.

I guess the sweet spot is something like
# default disk size (in GBs)
size=10

And document this in the readme. This means users know exactly were to modify the main.tf directly in case they run into the same disk full issues. Something like https://github.com/bentoml/aws-ec2-deploy#troubleshooting could help too.
What do you think @pjchungmd ?


A possible attack on the "Raffle".

Contracts cannot accept ETH if they do not have receive or fallback functions. It follows from this that if a smart contract participates in the lottery and wins an error will occur, on the line:
(bool success, ) = recentWinner.call{value: address(this).balance}(""); ,
since it simply will not be able to accept ETH.
To avoid this situation, we can check the presence of a bytecode from a potential participant when he is just trying to enter the lottery, in the following way:
if (msg.sender.code.length > 0) revert Raffle__OnlyForEOA();
In theory, after an error occurs, Chainlink Keeper will call performUpkeep in the next block, since checkUpkeep will still return true. Therefore, it's not too scary, but we will lose our Link tokens, which are spent on VRF v2 and Chainlink Keeper.
PS: I understand that this is an educational course and at such an early stage it would be difficult to explain different types of attacks, but I decided it was worth mentioning)

Nice catch! @KumaCrypto
I'm interested in the various attacks on smart contracts would you mind collaborating or maybe sharing resources about these attacks?

Thanks @othaime-en ! I am always happy to collaborate with people motivated for development, so welcome, in the profile you can find how to interact with me.
Regarding this type of attack is denial of service (DoS), you can find a lot of resources on this. A real example of this type of attack is the "King of the Ether" project.
Examples and explanations can also be found at the links: here (point 3.3) and here. (I hope it is allowed to leave links to third-party resources here for educational purposes).
The resources that I have indicated above consider a slightly different case in contrast to the lottery, but I hope this will give enough understanding! :)

@PatrickAlphaC I agree, you're right! I don't want to deprive other smart contracts of the opportunity to interact with our lottery!
Then, instead of directly sending native currency (for example, ETH) inside the fulfillRandomWords function, we can create a separate function, for example, "withdraw" for the winners.
Then there will definitely be no errors during the oracle transaction, and also maybe we will pay less for callbackGasLimit :)
Only in this case it will be necessary to additionally store information about who won how much.
I'm not calling for anything to be corrected, it's just that if anyone reads, they might be inspired by the idea and do it themselves :)

Thanks @KumaCrypto. I'll definitely keep in touch if I have a project coming up.

Yes! Anytime you're using a dynamic array you run into a chance for denial of service attacks!


Calling into thim agent to get collateral.

Adding call to thim agent for Get cert collateral.
Updating the API call to THIM service to use the new noauth API introduced in the service.

Testing:

Unit tests pass on Windows.

Reopening the PR using msft account.


Use ChromeTabs for OAuth2 web forms

These tend to be finicky since you can't control the custom tab after it's been created. You can foreground your new activity to respond to the callback, but the user will still be able to press back and go back to the tab again. Chrome team was looking into supporting this use case better awhile back but not sure what happened.

Thanks. We've reached out to Google (both the chrome and identity teams) to
see if there is a proper way to do this.
On Tue, Jun 7, 2016, 1:44 AM Zac Sweers<EMAIL_ADDRESS>wrote:

These tend to be finicky since you can't control the custom tab after it's
been created. You can foreground your new activity to respond to the
callback, but the user will still be able to press back and go back to the
tab again. Chrome team was looking into supporting this use case better
awhile back but not sure what happened.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/uber/rides-android-sdk/issues/22#issuecomment-224217218,
or mute the thread
https://github.com/notifications/unsubscribe/AFExoKk_uPKqlydtSviRSlPhc5bh5b-8ks5qJS9igaJpZM4Ivn6H
.

Hi, are there any news about this topic?

This is implemented from #108


Feature Request: Add option to AuthorizeSecurityGroup by Security Group Name

I would like to see the option to be able to add a rule to Security Groups both Ingress and Egress where only the names of the security groups are provided.   This will help in setting up automation scripts.

This tool has this function, you can run "aliyun ecs AuthorizeSecurityGroup xxxxx"

No it requires security group id of the rule you are adding, not name
Eg if i want to allow port 443 to all instances in the testsg to goto testdestsg i cannot specify  both testsg and testdestsg by name in the command.

No it requires security group id of the rule you are adding, not name
Eg if i want to allow port 443 to all instances in the testsg to goto testdestsg i cannot specify both testsg and testdestsg by name in the command.

Hi，CLI Project  just calls the API provided by the product side，so if you want to be able to add a rule to Security Groups by name, We recommend that you Communicate with the product team.
If there is no follow-up reply, we will close this issue after February 22, 2019.
Thank you for your attention to AliCloud CLI Project！


Implement PIREP filing lifecycle

We need to know the current status of a PIREP / flight.

Maybe PIREP status table
New coloumn in flights table with link to PIREP status?

Possible status: Accepted, Rejected, Rejected with comment, accepted with comment

This was solved in commit 916d83b.


Keybindings customization

Would be nice to be able to customize the keybindings. For instance, I'm used to Super+Tab instead of Alt+~ to switch between windows of a given app.
Perhaps a small config file living next to the exe would do the trick? Automatically created with default values when running the exe for the first time?
Very nice project otherwise, I've been dying to find something like that for a while.

Hey, thanks for the feedback. This would be nice indeed, I'll add this :-)

Juste added this to the last release. Launching the exe should create a MacAppSwitcherConfig.txt file. The program must be relaunched to apply the new bindings.
Supported keys and format are briefly presented inside the created txt file.
It's a first draft, feedbacks are welcome :-)

Just tried it: works fine as far as I can see 👍 Thanks a bunch 🙇

Hey ! Indeed, I overlooked the issue. I think I found a more robust solution. Key release only is bypassed now. This should let you use windows key as an "hold" key without interfering with start menu.

Maybe the window swtich shouldn't exactly work the same way as the app swtich? In a sense, it doesn't really require holding because there is nothing to display. It's just a very normal combination of keys.

Indeed, not having any "hold" could work :-) Having a consistent behavior for hold key still is important as one might use window key for app switch, but from a UX perspective, it would be nice to have this option too.

Works like a charm now, thank you so much ❤


[FEAT]: split prompt, param, eval prompt into three config files

Description
instead of using one single config file, split them
Additional Information
No response

fixed in #657.


[Enhancement] Add support for zstd

zstd is becoming a popular standard for compression, any plans to add it?
https://facebook.github.io/zstd/

@kallisti5 flate2 is specifically a crate for the DEFLATE/zlib/gzip format. I don't think it makes sense to add zstd support to it. There are already multiple crates for zstd, including https://crates.io/crates/zstd and https://github.com/Nemo157/async-compression/ .


Event handlers being dockable blocks is confusing (IE ability to nest)

While it's useful for advanced users to be able to dynamically allocate event handlers, this is an advanced user behavior.
We commonly see people incorrectly putting event handlers inside the 'forever' loop, or inside other event handlers. This leads to unexpected behaviour and frustration:
Two examples of this:
Radio received inside a 'forever' block

This doesn't do what you'd expect! When I saw this behaviour the user was expecting the second handlers to fire only after button A had been pressed, but only the first handler ever fires.

(Even when the handler is top level, the behaviour is still not as expected - the user expects the code always to enter via the top level handler, but actually after button A is pressed once, the second two handlers fire and never the first?

Joe/James Jonny (me!) each thought that this would do something different:
Joe: Only the first handler ever will fire
Jonny: Both will fire for button A, only button B will fire after the first press of A
James: Only the second one will fire afterwards <-- James was correct, it seems from the simulator
)
This is a long way of saying "should we have hats in PXT for event handlers?"

Teachers are already used to it from Blocks and Scratch
It makes the kind of odd racey undefined conditions much less possible

Supporting advanced uses seems possible through Typescript

Hats were brought in to support rountripping to/from JS.

bringing hats would be a major breaking change
hats would prevent roundtripping of program with nested handlers or forever loops

Note that hats do not solve the problem of registering the same event multiple times (#850).

@pelikhan can you please explain "hats were brought in to support roundtripping"? We can't see hats but maybe I'm missing your point.
Agree it'd be a major breaking change, but that means we should get the right behaviour sooner rather than later, if we're going to make that change.

In reference to #850 - if using hats we could more easily warn/disallow more than one event handler per event - whereas the current behaviour it's quite valid to later re-set a handler, with hats we'd rule that out in blocks, and take the 'hit' of being unable to round-trip if/when someone adds event handlers dynamically/not in a hat.
For simple round-tripping, what about the rule "event handers at the top level get converted to have hats, event handlers anywhere else get converted as normal blocks or don't get converted at all"

As you noticed, if someone uses a nested event-like interface (forevoer, on...) in JavaScript, it would not be possible to reconstruct it back in blocks.

@jaustin I'm not sure your conditional 'hat wearing' solves the problem? People will often put down a forever, then put an event handler inside it, so that will 'miss' this error/warning, because you are assuming people will put in the event handler first (which gets a hat) and then wrap a forever around it. I see people doing it the other way (they put in forever first, then the event handler inside it).

I'm not convinced by this idea of forever loops or event handlers being nestable. In real world software, it's universally indicative of "clever" but bad design. From a teaching point of view, it's impossibly complex to explain.
The block editor, IMHO, should be trying to reproduce everything that's possible in JS. It should be providing the clearest, some staff route for teaching the fundamentals of programming. Being able to best forever loops and event handlers is neither clear nor a fundamental of programming. It makes it very difficult to explain to bright kids the intended operation of code and even more difficult for less bright kids to get their heads around what the blocks mean.
For example, chained forever blocks execute in parallel. That makes literally no sense...sequantial blocks executing in parallel is nonsense. So outermost forever blocks should not be chainable. Likewise event handlers.
It'd be better to teach the design pattern of one event handler then set variables based on conditions / state that is checked with the handler. This also produces cleaner, safer code that avoids many pitfalls. And again, sticks to industry recommendations. I have never seen a good system that dynamically adds events as a way of conditionally enabling actions. Nested forever doesn't make sense unless a break statement is possible (which I don't recall seeing) and a while-true loop is more appropriate if children are trying to use that kind of complex design construct.
As a teacher, as a software engineer and as a computer science student, I'd like to see nested forever loops and event handlers removed.

I saw a lot of students using the forever block as simply "the place that all the code goes". It's the first example you see and I think they just assumed that you had to put everything there. Some of them even had to go hunting around for the "while true" block because they wanted to repeat something forever but didn't know how. When I explained how the forever block worked they were surprised.
They were also caught out by the event handlers overwriting each other. In every similar examples to @jaustin.
How about having some static blocks in the editor for the common events. You can't move them around or delete them, you can only add blocks into them. That way there's an obvious place to put all of the handler logic. There could also be a static init block?
If the first example uses the static blocks instead of the forever one then I think fewer people would confuse its purpose.

After discussion, we have decided to bring in hats. Work in progress in "hats" branch.

PR https://github.com/Microsoft/pxt/pull/925

The "unpluggable" events are now live in beta.
We are doing a best effort to load existing scripts without messing them. Please tell us if the conversion went bad. The strategy is simply: try loading blocks. if fail, try loading javascript. Scripts that have nested events are still valid in javascript but not in blocks anymore.

Duplicate events are now detected and live in beta. I think this covers this bug.
https://github.com/Microsoft/pxt/pull/940

"on start" button now required for initialization code.
https://github.com/Microsoft/pxt/pull/945


Add support for listing files on the container filesystem

Use-case:
I want to extract a particular file from a container, but am not sure where it is located ahead of time.
A/C:
Provide an dcp ls command that can list the files on the container filesystem and write the list to stdout. The user then can use the -c flag to extract just the particular file they are interested in.

Note: there is a well-established tool that provides this functionality called dive: https://github.com/wagoodman/dive
It may be worth rethinking whether we want to implement this functionality in dcp, or simply recommend dive for ls-type functionality.


Connecting to docker container on local host

We have TRIRIGA running in a docker container on local host. Is this template suitable for generating a frontend that connects to the local instance? If so, could you update the READme with instructions?
Also, TRIRIGA_USER, TRIRIGA_PASSWORD are not included in the .env.development.local file?

It does not have any restriction to connect to a local instance.
TRIRIGA_USER, TRIRIGA_PASSWORD should be added to  .env.development.local if you want to run the npm deploy stript. I will include both in the .env.development.local.template file.

It does not have any restriction to connect to a local instance.
TRIRIGA_USER, TRIRIGA_PASSWORD should be added to  .env.development.local if you want to run the npm deploy stript. I will include both in the .env.development.local.template file.


Any way to adapt response to Messenger webhook

Hi there!
I'm looking for help with Facebook Messenger webhook for a serverless technology bot.
The problem that exists today is the impossibility of responding correctly to the messenger webhook, as it does not accept a JSON dictionary as an answer, but only a token.
Error 400 Bad Request:
function webhook (params) {
  if (params ['hub.verify_token'] === 'AWESOME_TOKEN') {
    return Promise.resolve (params ['hub.challenge']);
  }
}

Answer is not accepted by webhook:
function webhook (params) {
  if (params ['hub.verify_token'] === 'AWESOME_TOKEN') {
    var apiResponse = {
      body: params ['hub.challenge'],
      statusCode: 200
    };

    return Promise.resolve (params ['hub.challenge']);
  }
}

Is there any way to send a response without a JSON data dictionary? If there is no alternative to this problem?
Thanks for the help.

Yes, you can use webactions

For FB in particular, here's a sample code:
function main(params) {
  let verify_token = params.verify_token || "token";
  if (params["hub.mode"] == "subscribe" && params["hub.verify_token"] == verify_token) {
    // this request is just a verification request from Facebook
    return {
      headers: {
        'Content-Type': 'text/html'
      },
      body: params["hub.challenge"],
      statusCode: 200
    };
  };
}

Use --web true when invoking action create ... to create  a web action.

@ddragosd Thanks for the sample code, but if you can continue to guide me ...
Even with the changed headers I'm getting the same problem.
Facebook webhook returns me:
Response does not match challenge, expected value = "789827496", received = "{\ n \" body \ ": \" 78982 ... "
And Openwhisk successfully returns me:
{"body": "789827496", "statusCode": 200, "headers": {"Content-Type": "text / html"}
Is there any way to openwhisk to return the hub.challenge without a JSON body? Or alternative?

What URL are you using for the webhook? It should not have a .json extension.

@rabbah I am using IBM Openwhisk with IBM API Gateway for url endpoint.
URL: /chatbot/bot/webhook
In APIGateway Content response type was enabled: Use the "Content-type" header of the action
How can I see the output in the url... It seems that the header is not being respected, or is there something else to work correctly?

Updating information ...
Using payload:
return {
  headers: {
    'Content-Type': 'text / html'
  },
  body: '123456',
    statusCode: 200
  };

Created with --response-type HTTP and working properly.
wsk api create / webhook / test get webhook --response-type http
Endpoint for test: /webhook/test
Created via Serverless Framework, probably using --response-type json. Not working.
Endpoint for test: /chatbot/bot/webhook
Is there any way to update --response-type? How to wsk api UPDATE ... --response-type http
The IBM headers change interface does not appear to respond to changes.

@jthomas @mdeuser can comment on serverless framework and api gw.
I suggest you at least validate the direct web action URL works.
If you use the wsk CLI, try wsk action get --url actionName and curl the URL.

> cat t.js
function main() {
return {
  headers: {
    'content-type': 'text/html'
  },
  body: '123456',
  statusCode: 200
};
}

> wsk action update t.js t.js  --web true
ok: updated action t.js

> curl `wsk action get t.js --url | tail -1`
12345

i suggest you delete the link you have in your action for Content-type and type it out from scratch.

Since it is working perfectly when using the wsk CLI and regardless of a content-type lowercase or capitalize ... Everything indicates that it is something in the creation of an API when using Serverless in relation to --response-type and I am unable to upgrade ...
@ddragosd @rabbah thank you for the prompt and accurate directions.
I will try to get guidance from this issue with the Openwhisk Serverless team.

This issue can be closed as it's an issue with the serverless framework integration:
https://github.com/serverless/serverless-openwhisk/issues/80


HDDS-9097. Add openFileTable in CleanupTableInfo of OMOpenKeysDeleteResponse

What changes were proposed in this pull request?
OMOpenKeysDeleteResponse deletes both from openKeyTable and openFileTable depending on the bucketLayout. This patch adds openFileTable as the list of cleanupTables.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9097
How was this patch tested?
Existing CI.

Hi @kaijchen, could please take a look? Thank you.

thanks for the patch @ivandika3! thanks for the review @kaijchen and @aswinshakil!


[BUG] aws-nuke failures on 3.28.0 and 3.29.0

On 3.28.0 aws-nuke failed with the error
time="2024-10-18T10:03:06Z" level=fatal msg="*resources.CloudWatchEventsTarget does not support custom properties"
and on 3.29.0 aws-nuke failed with the error
time="2024-10-19T10:03:02Z" level=fatal msg="*resources.BackupVaultAccessPolicy does not support custom properties"
These errors were warnings not fatal on 3.27.0 and earlier. So something has changed since that release.

Interesting, I'll take a look right away.

This was an inadvertent bug introduced when I was finishing up the filter group feature which is currently behind a feature flag inside of aws-nuke. It was introduced in<EMAIL_ADDRESS>This PR https://github.com/ekristen/libnuke/pull/81 and subsequent release of libnuke has the fix, it'll land in aws-nuke shortly. https://github.com/ekristen/libnuke/releases/tag/v0.21.1

:tada: This issue has been resolved in version 3.29.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


tsp, prepare release for upgrading tsp and related libs to 0.61

"update core" should be the 1st step

"update core" should be the 1st step
the "sync" is meaningless when your core is not the correct version

Thanks. Yeah, I realized it, so I run sync_versions and syncTests script again after update core. But I committed the sync files first and then core. Sorry for the confusion.

sync_version would update into the core.
But hope it does not matter...

sync_version would update into the core.  But hope it does not matter... And this should not be the cause of your diff.

My previous diff is caused by I did not regen for vanilla-tests.

sync_version would update into the core.  But hope it does not matter... And this should not be the cause of your diff.

My previous diff is caused by I did not regen for vanilla-tests.

I know. What I mean is the jar dependency in both repo best to be same. If different there could be unexpected situation that could waste dev effort to investigate.

sync_version would update into the core.  But hope it does not matter... And this should not be the cause of your diff.

My previous diff is caused by I did not regen for vanilla-tests.

I know. What I mean is the jar dependency in both repo best to be same. If different there could be unexpected situation that could waste dev effort to investigate.

ok, I see.


New Github Repo for DEI Microwave Virtual Lab

Hello,
I have updated the source code of DEI's Microwave Virtual Lab, earlier it had few problems but now it is running fine. The new Github repo for it is https://github.com/mrikum7/microwave-virtual-lab.git

@mrikum7
This issue should be raised in engineer forum also please specify the issue clearly


feat: determine a process manager

We need something to launch our lore-machine on machine startup. We also need something that re-launches our lore-machine in case the program crashed

Decided to go with systemd


Locale maintenance

Mentioned in #35 and #138, we need a better way to manage our localization efforts; translators should not need to learn how to use Github just to translate "Entities per tick" for us.
However, it's unlikely any existing TMS really has support for Factorio locale.cfg files (unless there is one? Please tell me if so) so we'll likely have to build something ourselves, by parsing the locale files into a format that our chosen TMS supports and then back again from whatever it exports.
As an example, Loco supports many file formats and we could use any of them, ideally one that supports adding some notes to explain wtf each resource string is (where does YARM-category-totals go?).

Well, that was easy, it turns out all I had to do was install this Github app: https://github.com/dima74/factorio-mods-localization


Renaming a project fails silently when the name includes an invalid caracther

Description
When renaming a project, if the name contains an invalid character (like /) the action fails silently, simply not renaming the project. Recording below to illustrate the issue:
https://github.com/dbeaver/dbeaver/assets/26719984/c4d104f5-c811-40ab-bca7-69cca5a4ef21
I believe a user would expect a behavior similar to the Project Create Wizard, where it shows an error message and the 'confirm' button is disabled:

PS: Not sure if I should have filed this under bug or feature request as, technically, it's working fine. However, since an error message should be the expected behavior, I think it fits better under a bug report. Apologies if I misclassified the issue.
DBeaver Version
Community Edition 23.3.4
Operating System
macOS Sonoma 14.1
Database and driver
No response
Steps to reproduce

Rename a project with a name containing an invalid character (like /)
Observe that the name has not changed

Additional context
No response

Hello @miguelbrandao
Thanks for the report.
As for other errors - you can find the info in the Error Log.

But we can enhance this specific case and add some warning.


Problem with SELECT COUNT(DISTINCT FIELD))

I wonder why Apache Druid 25.0.0 generates different results when executing two queries that apparently should return the same results. The queries have been executed with the same data in the table involved:
Query 1:

Query 2:

On HIVE tables with the same data, the result obtained with both queries is the same as Query 2 in Druid. I suspect that there is some problem when executing the query with COUNT(DISTINCT FIELD))

Its because one query is using approximate distinct count while the second one is using exact distinct count. You can disable approximate in the query context (click on "..." next to Engine)