Fork me on GitHub
#cljs-dev
<
2019-06-17
>
dnolen13:06:48

@lee how? re: ns clashes? Is there a link somewhere to how moving away from goog.provide would solve that?

dnolen13:06:38

@lee not really interested in jsvu

dnolen13:06:05

affordances like that for devs is just not high priority

dnolen13:06:32

and not interested in pulling in more stuff when installing JS engines is not that hard

lread13:06:45

@dnolen, my question on ns clashes is out of pure ignorance - and by ns clashes, I mean things like a.b.c clashing with a.b/c in cljs due to way namespaces are represented in Google Closure . Within the ClojureScript Podcast on Google Closure they touched on one of the reasons for goog.provide deprecation is the use of globals. This made me wonder if the use of globals is related to the namespace clash problem and if using modules would in any way help here.

lread13:06:53

@dnolen re jsvu - I think I’ll use it because I found getting WebKit engine on linux and windows mystifying and building v8 more involved than I’d like, especially on Windows. But I do appreciate that changes (and reliance on 3rd party tools) have a risk/cost and can close the JIRA issue I created.

lread13:06:58

And… I do sincerely appreciate you letting me know you aren’t interested in jsvu… saves me from wasting effort.

Roman Liutikov13:06:14

It feels like ending externs inference guide with this part in https://clojurescript.org/guides/externs#return-types is a bit confusing. What this warning is about? Does it mean that it’s safe to ignore it?

dnolen15:06:16

@roman01la the warning is precise

dnolen15:06:32

we propagate type information

dnolen15:06:04

and check that an externs exists for some property you want to use

dnolen15:06:18

if it warns in that particular case maybe that property doesn't exist

dnolen15:06:34

so you have an interop problem

dnolen15:06:54

@lee jsvu, no worries

dnolen15:06:39

@lee well that makes two of us re: goog.provide - I wasn't aware that the new modules stuff solves the global ns issue?

lread16:06:57

@dnolen, re goog.provide - I don’t know enough to answer if new modules stuff solves the global namespace issue but maybe? https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide

dnolen20:06:55

@lee yeah I think the description is misleading

dnolen20:06:02

re: goog.module

dnolen20:06:30

what they're talking about wrt. to "global" is top level var

dnolen20:06:44

but we don't do that anyway since nobody is writing JS by hand

dnolen20:06:46

far as I can tell the benefits are entirely from the perspective of someone writing JS directly

thheller21:06:06

@dnolen if I understand correctly the closure compiler folks will deprecate goog.provide/require entirely and move to path based es6 style import/export

thheller21:06:18

but not for a while I guess