Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make app ids more unique #6113

Merged
merged 2 commits into from
Sep 28, 2016
Merged

Conversation

devoncarew
Copy link
Member

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

@@ -6,6 +6,8 @@ import 'dart:async';
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
Member 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.

@@ -6,6 +6,8 @@ import 'dart:async';
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
Member 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