The ~/.gradle and ~/.android dirs are mounted as volumes for the docker
container when building the app, because we want the gradle and android
deps to be cached on the host after they've been downloaded.
The build process was assuming that these dirs always already existed,
and this assumption makes the building process fail if they actually
don't.
Therefore this change creates the directories on the host if they don't
already exist.
Change-Id: I90b5f73db0ffcbe76adc12157e142091808bde2b
This CL addresses issues #685 and #862.
The general problem is that some critical errors, that lead clients such
as camput to exit with failure, are not displayed when not running in
verbose mode.
The reason that happens is because of code such as:
if *cmdmain.FlagVerbose {
log.SetOutput(cmdmain.Stderr)
} else {
log.SetOutput(ioutil.Discard)
}
which means that in non-verbose mode we discard absolutely all log
messages, even those that would be printed during a Fatal* call.
To address that problem, we introduce a logger, as well as the Printf
and Logf functions using it, in pkg/cmdmain. These two functions only
output when *cmdmain.FlagVerbose is true.
Commands such as camput or camtool should now always:
1) log.SetOutput(cmdmain.Stderr) in init().
2) use log.Printf for messages that should always be printed.
3) use cmdmain.Printf/Logf for messages that should only be printed when
*cmdmain.FlagVerbose is true.
4) use log.Fatal for critical errors.
5) optionally, set the Verbose and Logger of the client(s) they are
using.
Also, camput and camtool are now relying on the global -verbose flag
from cmdmain, instead of having to define one for each subcommand.
fixes#685fixes#862
Change-Id: I088032fd28184a201076097bf878894b22a8a120
I had pasted them from an example when I started to work on the map
aspect, and forgot to look up their meaning/use afterwards.
Fixes#964
Change-Id: Ic92dcd9641a7fad49707c24f114b370f2c887828
According to https://golang.org/pkg/html/template/#ErrorCode
(ErrPredefinedEscaper), the template engine already performs
sanitization equivalent to urlquery on any pipeline, and therefore makes
this extra urlquery call unnecessary, and even maybe harmful.
Change-Id: I7fcce395bf015b64022d1ac66b42069cdefb69eb
To rev 37a4c36ce6286bb78bceb20579fecdfe7a759e02
Fix vendor/embed/closure/updatelibrary.go to now fetch from github.
Fix pkg/misc/closure/gendeps.go to work with new addDependency calls.
Fixes#903Fixes#961
Change-Id: Ie555cf9bf5a8624845095fb3351482a690a2571c
It looks like our vendored version of goog.dom.getDocumentScrollElement().scrollTop
does not work anymore for all browsers, as infinite scrolling is broken
for some.
This change is a work-around while we're working on a cleaner fix, like
seeing if an updated closure lib works correctly.
Fixes#961
Change-Id: I713529ff796f50ff7cf9234befbf6abbfb75e3cb
Apparently the html escaper was not being used in the right order/place,
and the auto-escaper does a better job than us at escaping?
For reference: https://go-review.googlesource.com/c/go/+/37880
I have noticed some odd results when trying other escaping combinations,
but that's a Go problem, if any, that I will investigate independently.
Fixes#960
Change-Id: I43e6eca26404d0bcbc7a48764393186f1d112dbc
If we keep app/publisher/js/zsearch.go, when running make.go, it first gets mirrored into
CAMLI_ROOT/tmp/build-gopath-nosqlite/src/camlistore.org/app/publisher/js/zsearch.go
, with the same modtime as app/publisher/js/zsearch.go.
Then in genSearchTypes,
CAMLI_ROOT/tmp/build-gopath-nosqlite/src/camlistore.org/app/publisher/js/zsearch.go gets
regenerated anyway, because its modtime is older than that of
CAMLI_ROOT/tmp/build-gopath-nosqlite/src/camlistore.org/pkg/search/describe.go
Then in a subsequent run of make.go, the mirroring overwrites the newly regenerated file,
because its modtime is different (indeed, it is newer) than that of
app/publisher/js/zsearch.go
And the cycle repeats ad vitam eternam.
I think if we added app/publisher/js/zsearch.go to mirrorIgnored, it
might fix the problem, but I don't see the point in even keeping
zearch.go in git at all, so I propose with this CL to simply remove it.
If removed, it is simply generated at the first make.go run, and never
again afterwards (except if pkg/search/describe.go changes).
Fixes#957
Change-Id: Ia6fcc50ce33513a2003809783fc323ab36a60b52
Vendoring:
- update gopherjs to rev: b40cd48c38f9a18eb3db20d163bad78de12cf0b7
- as usual, replace the fsnotify import statements with our dummy
pkg/misc/fakefsnotify, as described in
https://camlistore-review.googlesource.com/c/9409
- add vendor/golang.org/x/tools/go/gcimporter15 dependency from
rev: e531a2a1c15f94033f6fa87666caeb19a688175f
- make.go + .travis.yml: make go1.9 the required version
- Update comments on doc/environments-vars.md for CAMLI_GOPHERJS_GOROOT
Fixes#948Fixes#949
Change-Id: I9285aebadad1502708d164a9dc69e044a325cb3a
This change adds a check right after index initialization that
enumerates blobs for a few seconds and verifies that all of them are
indexed.
A warning is logged if any of the blobs are not found in the index.
Issue #947
Change-Id: Idc0df2121c1fb58e7560173b7753eaaddc4e653b
Some errors such are missing fields, or wrong values, or conflicting
values were already caught logically when the high-level configuration
is transformed into the low-level configuration. Or later when
initializing handlers.
However, there was no mechanism to catch typos such as "httsCert"
instead of "httpsCert", or "leveldb" instead of "levelDB" in the
high-level configuration. Such errors would result in misconfiguration
(e.g. use of Let's Encrypt instead of the desired HTTPS certificate)
which can then even go unnoticed since the server still starts.
Therefore, this change generates a fake serverconfig.Config with all its
fields set, so that its JSON encoding results in a list of all the
possible configuration fields. This allows to compare the given
configuration fields with that list, and catch invalid names.
Change-Id: I4d6e61462353e52938db93ba332df2d52225e750
The DownloadHandler only accepted file schemas as input for building a
zip archive so far.
It can now zip directories and their contents as well.
Non-regular files (socket, fifo, symlink) are now handled too.
As previously, no compression is applied when zipping.
When the DownloadHandler's Fetcher is a caching fetcher, all the files
that are supposed to be included in the archive are read, so we can
report reading errors even before starting to create the archive. We now
also take advantage of this optimization to build a
blobRef->filepath mapping when checking the files. Then, when the zip
archive is actually being built, the file path can be looked up in the
map, instead of having to assemble it again with recursive concatenation
of directory names.
Change-Id: I853c495798a9a43e12f3386603a70560ff46a237
myitcv.io/react replaces github.com/myitcv/gopherjs/react.
This commits also includes relevant changes to reflect the new API of
myitcv.io/react:
https://github.com/myitcv/react/wiki/Changelog
myitcv.io/react
rev 0b147f16090bc5007116c494ca7ea95f78ee4a16
myitcv.io/gogenerate (required by myitcv.io/react/cmd/reactGen)
rev bd69a94c96953d20e106734856b69d71c8fa122b
github.com/gopherjs/jsbuiltin (required by myitcv.io/react)
rev 67703bfb044e3192fbcab025c3aeaeedafad1f2f
Change-Id: I1951519d30455915aa2f75fbb418057f8075e27c
-keep the browser URL bar in sync with the current search/zoom-level
-introduce the "map:" predicate, to be used as the current viewport in
the map aspect. This was previously achieved with the locrect predicate. We
try to keep this new predicate unknown to the server, and replaced on
the fly by an equivalent locrect predicate.
-stay on the map aspect when the search expression has a map predicate.
Same thing when loading a URL with a map predicate parameter: try to
load directly on map aspect, instead of going to search aspect first.
-make sure there's only at most one map query in flight at all times
Change-Id: Ibf928ee5c926670c221f212f14ca9799e1e7bb79
Avoid select overhead in hot paths. Just use funcs.
Also, for sort-by-map searches, don't do a describe and pass over all
the results doing location lookups a second time. Remember the
location from the initial matching. Cache it on the search value.
Reduces some sort-by-map searches from 10 seconds to 3 seconds for
me. (still too slow, but good start)
Change-Id: I632954738df9accd802f28364ed11e48ddba0d14
We only started preventing NaNs from locations from being indexed at
ee13a3060b, so files indexed before
that could have introduced indexed NaNs, which we were not checking
against, until now.
Change-Id: I31fc8b9482cbd546591d553d7d8804700c7cf175
Add a plugin to the markers cluster, strongly inspired (but trimmed, and
modified) from https://github.com/ghybs/Leaflet.MarkerCluster.Freezable
to freeze the markers cluster as it is on each zoom level.
Fixes#940
Change-Id: Id7f1ed8182a5bd701c6c47e02b144a67f9b69b36
The "ref:prefix" search predicate is simply the equivalent of the
Constraint {
BlobRefPrefix: prefix,
}
search constraint.
The "ref:prefix" search expression was already supported by the search
box of the web UI, but as opposed to (all, I think) other search
expressions, it was not supported server-side. Which means, it had to be
converted to a search Constraint as the above, before being sent in the
query.
This change therefore fixes this inconsistency. In addition, but
relatedly, since the map aspect relies on expressing the zoom-level as a
locrect expression, it is much simpler if the search query it uses only
has to be constructed from search expressions, and without search
constraints. So if we want to be able to support marking a single node
search with the map aspect, while dealing only with search expressions,
this change is necessary.
Fixes#939
Change-Id: Ia58f410198ecd1f7e0981321da370d687df3a120