Skip to content

Conversation

@devoncarew
Copy link
Contributor

When returning launched app ids to clients, instead of generating ids using an increasing number (app-1, app-2, ...), use 128bit uuids. This makes them unique across daemon instances, which can be useful to clients that use multiple daemon instances.

@danrubel, /cc @stevemessick

import 'dart:convert';
import 'dart:io';

import 'package:usage/src/uuid.dart'; // ignore: implementation_imports
Copy link
Contributor

Choose a reason for hiding this comment

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

Frown

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be better to duplicate this code instead of importing something private? It looks pretty self-contained.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I maintain package:usage, so while this is a bit of a shortcut I felt not much risk of APIs changing out from under us.

But I can inline the class - it is self-contained and small.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe package:usage should export it in its API?

Anyway, its up to you.

@abarth
Copy link
Contributor

abarth commented Sep 28, 2016

LGTM

Copy link
Contributor

@danrubel danrubel left a comment

Choose a reason for hiding this comment

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

LGTM.

import 'dart:convert';
import 'dart:io';

import 'package:usage/src/uuid.dart'; // ignore: implementation_imports
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with Adam that it would be cleaner if the package exported the needed API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll inline this for now and file an issue to expose the API in usage.

@devoncarew devoncarew merged commit d9bbd2f into flutter:master Sep 28, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants