Skip to content

Conversation

hoylen
Copy link

@hoylen hoylen commented Jun 29, 2017

Updated crypto dependency

Updated dependency on the crypto package to '>=0.9.2 <3.0.0' to allow a newer version of crypto to be used that is compatible with Dart 1.24.

This was necessary, since the previous crypto dependency was '>=0.9.0 <0.10.0' which used crypto 0.9.2+1 -- and that version of crypto is incompatible with Dart 1.24 and newer. The underlying problem is because crypto 0.9.2+1 only works with convert 1.1.1 and earlier, and convert 1.1.1 and earlier needed the ChunkedConverter class. But Dart 1.24 has removed the ChunkedConverter class. Unfortunately, this was a breaking change even though the major version number of Dart was not changed to indicate that.

The result is sqljocky 0.14.1 is incompatible with Dart 1.24 and newer. The error message seen when trying to run "pub get" is:

Failed to precompile test:test:
'package:convert/src/hex/encoder.dart': malformed type: line 20 pos 13: cannot resolve
  class 'ChunkedConverter' from 'HexEncoder'
    extends ChunkedConverter<List<int>, String, List<int>, String> {

The newer versions of crypto uses newer versions of convert which are compatible with Dart 1.24, because they do not need the ChunkedConverter class.

Some code changes were necessary in auth_handler.dart to work with the newer versions of _crypto. Previously it was using a deprecated class (SHA1) that has been removed since crypto 1.0.0.

Cleaned up warnings

Cleaned up the code to remove some warnings (e.g. unused variables).

Cleaned up tests

Also, changed the print statements in the tests to go to logging (which is disabled by default). This way they don't clutter up the output so the pub run test command can parse the output.

Only one problem: integration test "issue 43" does not pass. But it didn't seem to pass before these changes. So was it previously broken?

@iChenLei
Copy link

iChenLei commented Aug 21, 2017

@hoylen Hello, Can you fork sqljocky and create a new repo,pub a new library to pub.dartlang.org? I think @jamesots no longer maintain the mysql driven repo. 😭 Dart's server ecosystem is so terrible 🔥 . @DartBot @anders-sandholm @jmesserly @nex3 The official member of dart-team.. We need help , I think the official should provide high quality sql driven. 🆘 👿

@jamesots
Copy link
Owner

Hi, the official sqljocky repo was moved to https://github.com/dart-drivers/mysql as I no longer have time to maintain this.

@iChenLei
Copy link

@jamesots Thank you for your work about sqljocky. Can you spend a little time to release a new version( maybe just merge the pr ) to fix the question. Dart 1.24.x remove the ChunkedConverter. So when I use the sqljocky, It will throw error as follows:

   Failed to precompile test:test:
   'package:convert/src/hex/encoder.dart': malformed type: line 20 pos 13: cannot resolve
   class 'ChunkedConverter' from 'HexEncoder'
     extends ChunkedConverter<List<int>, String, List<int>, String> {

Thank you ! 🆘 It's very important. 🌹

@hoylen
Copy link
Author

hoylen commented Aug 23, 2017

@jamesots Ok. I'll close this pull request, since you say this is no longer the "official sqljocky repo".

I see that https://github.com/dart-drivers/mysql has made a change to the crypto version over a year ago, but they haven't released a new sqljocky package. I assume you handed over permission so they can publish a new package to replace the existing packages?

Until they publish a new package, all references and documentation still refer to this repository and not that new "official sqljocky repo".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants