Is the limitation on dart-pad imports technical or policy?

23 views
Skip to first unread message

Jeremy Lewi

unread,
Mar 29, 2023, 2:11:34 AM3/29/23
to mi...@dartlang.org
Hi,

I was poking around dart-pad to see how far it can be pushed in terms of developing and executing code in the browser. One of the limitations, I quickly hit was being able to import additional packages (specifically Google API client libraries). In the source code it looks like there's a hardcoded list of packages. Are there technical limitations on what packages can be listed here? In principle, should any package that works on web be able to be used in dart-pad?

Thanks
J


Samuel Rawlins

unread,
Mar 29, 2023, 10:01:44 AM3/29/23
to mi...@dartlang.org
On Tue, Mar 28, 2023 at 11:11 PM Jeremy Lewi <jer...@lewi.us> wrote:
Hi,

I was poking around dart-pad to see how far it can be pushed in terms of developing and executing code in the browser. One of the limitations, I quickly hit was being able to import additional packages (specifically Google API client libraries). In the source code it looks like there's a hardcoded list of packages. Are there technical limitations on what packages can be listed here? In principle, should any package that works on web be able to be used in dart-pad?

The current implementation makes it a technical restriction; we don't download fresh packages from pub when you click Run (or when you stop typing, for that matter), in order to correctly compile your script. Instead, packages are installed in the back-end when the back-end is launched. Theoretically any package which works on the web can work in dart-pad (there might be some restrictions or issues with the security policies in the iframe...).

We consider requests for more packages to be made available in the issue tracker

Thanks
J


--
For more ways to connect visit https://dart.dev/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CACijwib3z5Dykv-YMJKGOsGFfbRRL6HAxOEcTKkaTj5BO44DEw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages