@@ -100,13 +100,15 @@ message InboundMessage {
100
100
repeated Importer importers = 6 ;
101
101
102
102
// Signatures for custom global functions whose behavior is defined by the
103
- // host. These must be valid Sass function signatures that could appear in
104
- // after `@function` in a Sass stylesheet, such as
105
- // `mix($color1, $color2, $weight: 50%)`.
103
+ // host.
104
+ //
105
+ // If this is not a valid Sass function signature that could appear after
106
+ // `@function` in a Sass stylesheet (such as `mix($color1, $color2, $weight:
107
+ // 50%)`), or if it conflicts with a function name that's built into the
108
+ // Sass language, the compiler must treat the compilation as failed.
106
109
//
107
110
// Compilers must ensure that pure-Sass functions take precedence over
108
- // custom global functions. They must also reject any custom function names
109
- // that conflict with function names built into the Sass language.
111
+ // custom global functions.
110
112
repeated string global_functions = 7 ;
111
113
112
114
// Whether to use terminal colors in the formatted message of errors and
@@ -141,8 +143,10 @@ message InboundMessage {
141
143
// that the importer either did not recognize the URL, or could not find a
142
144
// stylesheet at the location it referred to.
143
145
oneof result {
144
- // The successfully canonicalized URL. This must be an absolute URL,
145
- // including scheme.
146
+ // The successfully canonicalized URL.
147
+ //
148
+ // If this is not an absolute URL (including scheme), the compiler must
149
+ // treat that as an error thrown by the importer.
146
150
string url = 2 ;
147
151
148
152
// An error message explaining why canonicalization failed.
@@ -173,7 +177,8 @@ message InboundMessage {
173
177
// acceptable as well. If no URL is supplied, a `data:` URL is generated
174
178
// automatically from `contents`.
175
179
//
176
- // If this is provided, it must be an absolute URL, including scheme.
180
+ // If this is provided and is not an absolute URL (including scheme) the
181
+ // compiler must treat that as an error thrown by the importer.
177
182
string source_map_url = 3 ;
178
183
}
179
184
@@ -200,9 +205,10 @@ message InboundMessage {
200
205
// The absolute `file:` URL to look for the file on the physical
201
206
// filesystem.
202
207
//
203
- // The host must ensure that this URL follows the format for an absolute
204
- // `file:` URL on the current operating system without a hostname, and the
205
- // compiler must verify this to the best of its ability. See
208
+ // The compiler must verify to the best of its ability that this URL
209
+ // follows the format for an absolute `file:` URL on the current operating
210
+ // system without a hostname. If it doesn't, the compiler must treat that
211
+ // as an error thrown by the importer. See
206
212
// https://en.wikipedia.org/wiki/File_URI_scheme for details on the
207
213
// format.
208
214
//
@@ -836,7 +842,8 @@ message Value {
836
842
//
837
843
// If this isn't a valid Sass function signature that could appear after
838
844
// `@function` in a Sass stylesheet (such as `mix($color1, $color2, $weight:
839
- // 50%)`), the compiler must treat the function's return value as invalid.
845
+ // 50%)`), the compiler must treat it as though the function that returned
846
+ // this `HostFunction` threw an error.
840
847
//
841
848
// > This ensures that the host doesn't need to be able to correctly parse
842
849
// > the entire function declaration syntax.
0 commit comments