eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
397 stars 62 forks source link

Network request for HTTP/HEAD on cached modules #4731

Closed CeylonMigrationBot closed 8 years ago

CeylonMigrationBot commented 10 years ago

[@akberc] It is indeed the HTTP HEAD requests in exists and lastModified from getArtifact on a URL-based repository even if it is locally cached.

CMR does honour offline mode. However, when working online and network cuts out or becomes problematic --

Eclipse hangs and only recovery is to set off-line in the config properties again manually, i.e. without Eclipse present.

We probably have to assume that whenever it successfully downloaded a certain version of a complete artifact in whatever usable state (i.e. without source etc.) that is the state of the artifact and it is valid, unless cleaned out by the user.

Maven gets around the problem with and lastAccessed marker files or the whole SNAPSHOT method where it repeatedly tries to get the same module.

-- OR -- a very brief timeout on HEAD or more sophisticated network detection and recovery - like so auto-updaters etc.

In fact, Windows 8 (and probably Ubuntu) introduces the concept of metered and non-metered connections, but we can leave that for now, but at least leave out the JDK docs unless they are in the local JDK installation. In metred mode, software will not try to do any unnecessary tasks, so by adding java.base '7' it would not go and download javadocs over a mobile connection.

209 08:15:04 04/10/2013 18.2309433  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/io/undertow/core/1.0.0.Beta8/io.undertow.core-1.0.0.Beta8.src  {HTTP:14, TCP:13, IPv4:12}
225 08:15:04 04/10/2013 18.6405241  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/io/undertow/core/1.0.0.Beta8/io.undertow.core-1.0.0.Beta8.car  {HTTP:16, TCP:15, IPv4:12}
242 08:15:04 04/10/2013 19.0505722  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/org/jboss/xnio/api/3.1.0.CR6/org.jboss.xnio.api-3.1.0.CR6.src  {HTTP:18, TCP:17, IPv4:12}
259 08:15:05 04/10/2013 19.4597472  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/org/jboss/xnio/api/3.1.0.CR6/org.jboss.xnio.api-3.1.0.CR6.car  {HTTP:20, TCP:19, IPv4:12}
276 08:15:05 04/10/2013 19.8694404  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/org/jboss/xnio/nio/3.1.0.CR6/org.jboss.xnio.nio-3.1.0.CR6.src  {HTTP:22, TCP:21, IPv4:12}
293 08:15:06 04/10/2013 20.2789418  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/org/jboss/xnio/nio/3.1.0.CR6/org.jboss.xnio.nio-3.1.0.CR6.car  {HTTP:24, TCP:23, IPv4:12}
311 08:15:06 04/10/2013 20.6888620  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/org/jboss/logging/3.1.2.GA/org.jboss.logging-3.1.2.GA.src  {HTTP:26, TCP:25, IPv4:12}
328 08:15:06 04/10/2013 21.0986568  eclipse.exe 192.168.0.7 modules.ceylon-lang.org HTTP    HTTP:Request, HEAD /test/org/jboss/logging/3.1.2.GA/org.jboss.logging-3.1.2.GA.car  {HTTP:28, TCP:27, IPv4:12}

[Migrated from ceylon/ceylon-module-resolver#69] [Closed at 2013-10-04 16:35:35]

CeylonMigrationBot commented 10 years ago

[@quintesse] Checking for dependencies was done separately for each extension (.JAR or .CAR) instead of together. Fixed now.

CeylonMigrationBot commented 10 years ago

[@quintesse] Thanks btw @akberc , good catch!