helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: test(ext/node): check hostname option has precedence over host option

This PR adds a test case which checks that the issue #18154 is already resolved in main.

The `hostname` option has more precedence over `host` option in `ClientRequest` options. This behavior was fixed in [this commit](https://github.com/denoland/deno/commit/867a6d303285cdffd060e6bb4b0e97de73925cfe).

closes #18154

Changed files:
filename: tests/unit_node/http_test.ts
patch: @@ -8,6 +8,7 @@ import url from "node:url";
 import https from "node:https";
 import net from "node:net";
 import fs from "node:fs";
+import { text } from "node:stream/consumers";
 
 import { assert, assertEquals, fail } from "@std/assert";
 import { assertSpyCalls, spy } from "@std/testing/mock";
@@ -1586,3 +1587,20 @@ Deno.test("[node/http] ClientRequest content-disposition header works", async ()
   assertEquals(body, "hello world");
   assertEquals(headers["content-disposition"], "attachment");
 });
+
+Deno.test("[node/http] In ClientRequest, option.hostname has precedence over options.host", async () => {
+  const responseReceived = Promise.withResolvers<void>();
+
+  new http.ClientRequest({
+    hostname: "localhost",
+    host: "invalid-hostname.test",
+    port: 4545,
+    path: "/http_version",
+  }).on("response", async (res) => {
+    assertEquals(res.statusCode, 200);
+    assertEquals(await text(res), "HTTP/1.1");
+    responseReceived.resolve();
+  }).end();
+
+  await responseReceived.promise;
+});
Repository: facebook/react
Pull request: Remove unnecessary check

<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

When the code is executed to `!hasBeenInitialized && !didCheckForLazyInit`, `hasBeenInitialized ` must be false.
<!--
 Explain the **motivation** for making this change. What existing problem does the pull request solve?
-->

## How did you test this change?

It does not need additional test.
<!--
  Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
  How exactly did you verify that your PR solves the issue you wanted to solve?
  If you leave this empty, your PR will very likely be closed.
-->


Changed files:
filename: packages/react-reconciler/src/ReactFiberHooks.new.js
patch: @@ -1624,10 +1624,7 @@ function mountRef<T>(initialValue: T): {|current: T|} {
         },
         set current(value) {
           if (currentlyRenderingFiber !== null && !didWarnAboutWrite) {
-            if (
-              hasBeenInitialized ||
-              (!hasBeenInitialized && !didCheckForLazyInit)
-            ) {
+            if (hasBeenInitialized || !didCheckForLazyInit) {
               didWarnAboutWrite = true;
               console.warn(
                 '%s: Unsafe write of a mutable value during render.\n\n' +

filename: packages/react-reconciler/src/ReactFiberHooks.old.js
patch: @@ -1624,10 +1624,7 @@ function mountRef<T>(initialValue: T): {|current: T|} {
         },
         set current(value) {
           if (currentlyRenderingFiber !== null && !didWarnAboutWrite) {
-            if (
-              hasBeenInitialized ||
-              (!hasBeenInitialized && !didCheckForLazyInit)
-            ) {
+            if (hasBeenInitialized || !didCheckForLazyInit) {
               didWarnAboutWrite = true;
               console.warn(
                 '%s: Unsafe write of a mutable value during render.\n\n' +
Repository: huggingface/transformers
Pull request: unpin pytest<8

# What does this PR do?

unpin pytest<8 to see if we get rid of 

> Too long with no output (exceeded 10m0s): context deadline exceeded

as discussed internally https://huggingface.slack.com/archives/C01NE71C4F7/p1745514692206779?thread_ts=1745423231.198669&cid=C01NE71C4F7

Changed files:
filename: pyproject.toml
patch: @@ -55,3 +55,4 @@ markers = [
 ]
 log_cli = 1
 log_cli_level = "WARNING"
+asyncio_default_fixture_loop_scope = "function"

filename: setup.py
patch: @@ -149,7 +149,7 @@
     "psutil",
     "pyyaml>=5.1",
     "pydantic",
-    "pytest>=7.2.0,<8.0.0",
+    "pytest>=7.2.0",
     "pytest-asyncio",
     "pytest-rerunfailures",
     "pytest-timeout",

filename: src/transformers/dependency_versions_table.py
patch: @@ -55,7 +55,7 @@
     "psutil": "psutil",
     "pyyaml": "pyyaml>=5.1",
     "pydantic": "pydantic",
-    "pytest": "pytest>=7.2.0,<8.0.0",
+    "pytest": "pytest>=7.2.0",
     "pytest-asyncio": "pytest-asyncio",
     "pytest-rerunfailures": "pytest-rerunfailures",
     "pytest-timeout": "pytest-timeout",
Repository: nodejs/node
Pull request: sqlite: enable SQL math functions

This commit enables SQLite math functions.

Fixes: https://github.com/nodejs/node/issues/56435

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: deps/sqlite/sqlite.gyp
patch: @@ -13,6 +13,7 @@
         'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',  # -fvisibility=hidden
       },
       'defines': [
+        'SQLITE_ENABLE_MATH_FUNCTIONS',
         'SQLITE_ENABLE_SESSION',
         'SQLITE_ENABLE_PREUPDATE_HOOK'
       ],

filename: deps/sqlite/unofficial.gni
patch: @@ -8,6 +8,7 @@ template("sqlite_gn_build") {
   config("sqlite_config") {
     include_dirs = [ "." ]
     defines = [
+      "SQLITE_ENABLE_MATH_FUNCTIONS",
       "SQLITE_ENABLE_SESSION",
       "SQLITE_ENABLE_PREUPDATE_HOOK",
     ]

filename: test/parallel/test-sqlite.js
patch: @@ -103,3 +103,11 @@ test('PRAGMAs are supported', (t) => {
     { __proto__: null, journal_mode: 'wal' },
   );
 });
+
+test('math functions are enabled', (t) => {
+  const db = new DatabaseSync(':memory:');
+  t.assert.deepStrictEqual(
+    db.prepare('SELECT PI() AS pi').get(),
+    { __proto__: null, pi: 3.141592653589793 },
+  );
+});
Repository: ggml-org/llama.cpp
Pull request: added load_progress_callback to common_params

llama internally supports load cancellation, but when using common* API it's not available from outside:
```
struct common_init_result common_init_from_params(common_params & params) {
    common_init_result iparams;
    auto mparams = common_model_params_to_llama(params);

    llama_model * model = llama_model_load_from_file(params.model.path.c_str(), mparams); // <<< ----
    if (model == NULL) {
        LOG_ERR("%s: failed to load model '%s'\n", __func__, params.model.path.c_str());
        return iparams;
    }
[...]
```
to allow load cancellation it needs a `progress_callback`, but it requires passing `common_params` and internally `llama_model_params` builds the object always with progress_callback as null.

this PR simply provides an opportunity to set it from outside. however I called it load_progress_callback because the callback is used during model loading. user will still need to call llama_set_abort_callback for compute cancellation, but it can be done after calling common_init_from_params().


Changed files:
filename: common/common.cpp
patch: @@ -1102,6 +1102,9 @@ struct llama_model_params common_model_params_to_llama(common_params & params) {
         mparams.tensor_buft_overrides = params.tensor_buft_overrides.data();
     }
 
+    mparams.progress_callback           = params.load_progress_callback;
+    mparams.progress_callback_user_data = params.load_progress_callback_user_data;
+
     return mparams;
 }
 

filename: common/common.h
patch: @@ -428,6 +428,11 @@ struct common_params {
 
     // common params
     std::string out_file; // output filename for all example programs
+    // optional callback for model loading progress and cancellation:
+    // called with a progress value between 0.0 and 1.0.
+    // return false from callback to abort model loading or true to continue
+    llama_progress_callback load_progress_callback = NULL;
+    void *                  load_progress_callback_user_data = NULL;
 };
 
 // call once at the start of a program if it uses libcommon
Repository: vercel/next.js
Pull request: Update multi-zones.mdx

To serve the static content from the right application you also need a rewrite rule for the static assets and not only the actual content.

Fixes: #78811 


Changed files:
filename: docs/01-app/02-guides/multi-zones.mdx
patch: @@ -73,7 +73,7 @@ const nextConfig = {
 
 With the Multi Zones set-up, you need to route the paths to the correct zone since they are served by different applications. You can use any HTTP proxy to do this, but one of the Next.js applications can also be used to route requests for the entire domain.
 
-To route to the correct zone using a Next.js application, you can use [`rewrites`](/docs/app/api-reference/config/next-config-js/rewrites). For each path served by a different zone, you would add a rewrite rule to send that path to the domain of the other zone. For example:
+To route to the correct zone using a Next.js application, you can use [`rewrites`](/docs/app/api-reference/config/next-config-js/rewrites). For each path served by a different zone, you would add a rewrite rule to send that path to the domain of the other zone, and you also need to rewrite the requests for the static assets. For example:
 
 ```js filename="next.config.js"
 async rewrites() {
@@ -85,6 +85,10 @@ async rewrites() {
         {
             source: '/blog/:path+',
             destination: `${process.env.BLOG_DOMAIN}/blog/:path+`,
+        },
+        {
+            source: '/blog-static/:path+',
+            destination: `${process.env.BLOG_DOMAIN}/blog-static/:path+`,
         }
     ];
 }
Repository: denoland/deno
Pull request: fix: update deno_doc

contains a small fix for docs.deno.com related to descriptions

Changed files:
filename: Cargo.lock
patch: @@ -1487,9 +1487,9 @@ dependencies = [
 
 [[package]]
 name = "deno_doc"
-version = "0.146.0"
+version = "0.147.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48063b68a1646ef64811171b683eb2993e08260b33b2bd987649679945099370"
+checksum = "d876971414230c7837bb4dc3557be99265558e1f43d2b6092f90e8b5f45e1984"
 dependencies = [
  "ammonia",
  "anyhow",

filename: cli/Cargo.toml
patch: @@ -67,7 +67,7 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa
 deno_cache_dir = { workspace = true }
 deno_config = { version = "=0.30.1", features = ["workspace", "sync"] }
 deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
-deno_doc = { version = "0.146.0", features = ["html", "syntect"] }
+deno_doc = { version = "0.147.0", features = ["html", "syntect"] }
 deno_emit = "=0.44.0"
 deno_graph = { version = "=0.81.3" }
 deno_lint = { version = "=0.63.1", features = ["docs"] }
Repository: denoland/deno
Pull request: fix: delete old Deno 1.x headers file when loading cache

* https://github.com/denoland/deno_cache_dir/pull/59

Reasons listed in that deno_cache_dir PR.

Note: we could make this a bit better by upgrading the cache, but I'm not sure it's worth the effort. We'll see what feedback we get.

Changed files:
filename: Cargo.lock
patch: @@ -1347,9 +1347,9 @@ dependencies = [
 
 [[package]]
 name = "deno_cache_dir"
-version = "0.11.0"
+version = "0.11.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "405790fa1fa5f05c2e7dca817f820dc1c950ea846f47212ed6d670a3023cb4fe"
+checksum = "6df43311cb7703fa3242c282823a850e4c8d0c06b9527d8209b55bd695452ea5"
 dependencies = [
  "deno_media_type",
  "indexmap",
@@ -2010,9 +2010,9 @@ dependencies = [
 
 [[package]]
 name = "deno_semver"
-version = "0.5.12"
+version = "0.5.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eef522937758930b9d6897631fa94bc69bcbbe78613c939ab2054ca96191afbd"
+checksum = "6657fecb9ac6a7a71f552c95e8cc492466a75f5660224577e2226bcf30db9768"
 dependencies = [
  "monch",
  "once_cell",

filename: Cargo.toml
patch: @@ -52,7 +52,7 @@ deno_lockfile = "=0.23.0"
 deno_media_type = { version = "0.1.4", features = ["module_specifier"] }
 deno_permissions = { version = "0.26.0", path = "./runtime/permissions" }
 deno_runtime = { version = "0.175.0", path = "./runtime" }
-deno_semver = "=0.5.12"
+deno_semver = "=0.5.13"
 deno_terminal = "0.2.0"
 napi_sym = { version = "0.96.0", path = "./cli/napi/sym" }
 test_util = { package = "test_server", path = "./tests/util/server" }
@@ -103,7 +103,7 @@ chrono = { version = "0.4", default-features = false, features = ["std", "serde"
 console_static_text = "=0.8.1"
 data-encoding = "2.3.3"
 data-url = "=0.3.0"
-deno_cache_dir = "=0.11.0"
+deno_cache_dir = "=0.11.1"
 deno_package_json = { version = "=0.1.1", default-features = false }
 dlopen2 = "0.6.1"
 ecb = "=0.1.2"

filename: cli/cache/mod.rs
patch: @@ -74,6 +74,10 @@ impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv {
     atomic_write_file_with_retries(path, bytes, CACHE_PERM)
   }
 
+  fn remove_file(&self, path: &Path) -> std::io::Result<()> {
+    std::fs::remove_file(path)
+  }
+
   fn modified(&self, path: &Path) -> std::io::Result<Option<SystemTime>> {
     match std::fs::metadata(path) {
       Ok(metadata) => Ok(Some(
Repository: ggml-org/llama.cpp
Pull request: sync : ggml


Changed files:
filename: scripts/sync-ggml.last
patch: @@ -1 +1 @@
-9b048bb72b811f50b0c30d9e5c84d6ff9f4bf005
+7c06c10c532a6cda913c17fc56341e8880ae341d
Repository: facebook/react
Pull request: Add back lost cache test

I noticed that [this commit](https://github.com/facebook/react/pull/22510/files#diff-823ea908700d266f873a635cf238ef1997c6bc22df39959f6cd228031f7f38eeL207) changed this test from handling the mount case, to handing the update case. The major difference that I can see is that in the mount case the root cache is used (so there's no cleanup) but in the update case it's not used (so there is a cleanup). Seems valuable to test both cases (and writing this test helped me to understand the cache/cleanup behavior better).

Changed files:
filename: packages/react-reconciler/src/__tests__/ReactCache-test.js
patch: @@ -238,6 +238,53 @@ describe('ReactCache', () => {
     expect(root).toMatchRenderedOutput('Bye');
   });
 
+  // @gate experimental || www
+  test('multiple new Cache boundaries in the same mount share the same, fresh root cache', async () => {
+    function App() {
+      return (
+        <>
+          <Cache>
+            <Suspense fallback={<Text text="Loading..." />}>
+              <AsyncText text="A" />
+            </Suspense>
+          </Cache>
+          <Cache>
+            <Suspense fallback={<Text text="Loading..." />}>
+              <AsyncText text="A" />
+            </Suspense>
+          </Cache>
+        </>
+      );
+    }
+
+    const root = ReactNoop.createRoot();
+    await act(async () => {
+      root.render(<App showMore={false} />);
+    });
+
+    // Even though there are two new <Cache /> trees, they should share the same
+    // data cache. So there should be only a single cache miss for A.
+    expect(Scheduler).toHaveYielded([
+      'Cache miss! [A]',
+      'Loading...',
+      'Loading...',
+    ]);
+    expect(root).toMatchRenderedOutput('Loading...Loading...');
+
+    await act(async () => {
+      resolveMostRecentTextCache('A');
+    });
+    expect(Scheduler).toHaveYielded(['A', 'A']);
+    expect(root).toMatchRenderedOutput('AA');
+
+    await act(async () => {
+      root.render('Bye');
+    });
+    // no cleanup: cache is still retained at the root
+    expect(Scheduler).toHaveYielded([]);
+    expect(root).toMatchRenderedOutput('Bye');
+  });
+
   // @gate experimental || www
   test('multiple new Cache boundaries in the same update share the same, fresh cache', async () => {
     function App({showMore}) {
Repository: electron/electron
Pull request: build: update appveyor image to latest version

This PR updates appveyor.yml to the latest baked image, e-130.0.6695.0.

Notes: none

Changed files:
filename: appveyor-woa.yml
patch: @@ -29,7 +29,7 @@
 
 version: 1.0.{build}
 build_cloud: electronhq-16-core
-image: e-130.0.6672.0
+image: e-130.0.6695.0
 environment:
   GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
   ELECTRON_OUT_DIR: Default

filename: appveyor.yml
patch: @@ -29,7 +29,7 @@
 
 version: 1.0.{build}
 build_cloud: electronhq-16-core
-image: e-130.0.6672.0
+image: e-130.0.6695.0
 environment:
   GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
   ELECTRON_OUT_DIR: Default
Repository: vercel/next.js
Pull request: Turbopack: avoid tracking a modification when adding an already existing item

### What?

This makes sure that when trying to "add" and item that already exist, we don't flag the task as modified.

This commonly happens with `Dependent` edges. We just call "add" again, not knowing if they already exist.

Closes PACK-4519

Changed files:
filename: turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
patch: @@ -1501,7 +1501,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
 
         // handle stateful
         if stateful {
-            task.insert(CachedDataItem::Stateful { value: () });
+            let _ = task.add(CachedDataItem::Stateful { value: () });
         }
 
         // handle cell counters: update max index and remove cells that are no longer used
@@ -1938,7 +1938,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
                     .entry(RawVc::TaskCell(collectible.task, collectible.cell))
                     .or_insert(0) += count;
             }
-            task.insert(CachedDataItem::CollectiblesDependent {
+            let _ = task.add(CachedDataItem::CollectiblesDependent {
                 collectible_type,
                 task: reader_id,
                 value: (),

filename: turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs
patch: @@ -14,7 +14,7 @@ use std::{
 };
 
 use serde::{Deserialize, Serialize};
-use turbo_tasks::{SessionId, TaskId, TurboTasksBackendApi};
+use turbo_tasks::{KeyValuePair, SessionId, TaskId, TurboTasksBackendApi};
 
 use crate::{
     backend::{
@@ -466,6 +466,9 @@ impl<B: BackingStorage> TaskGuard for TaskGuardImpl<'_, B> {
         let category = item.category();
         self.check_access(category);
         if !self.task_id.is_transient() && item.is_persistent() {
+            if self.task.contains_key(&item.key()) {
+                return false;
+            }
             self.task.track_modification(category.into_specific());
         }
         self.task.add(item)
Repository: denoland/deno
Pull request: fix: upgrade deno_core to 0.307.0

- fix for https://github.com/denoland/deno/issues/25160
- disables pointer compression to fix https://github.com/denoland/deno/issues/24057
- changes needed to land https://github.com/denoland/deno/pull/25140

Changed files:
filename: Cargo.lock
patch: @@ -1404,9 +1404,9 @@ dependencies = [
 
 [[package]]
 name = "deno_core"
-version = "0.306.0"
+version = "0.307.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff7e5ec71a92ab026b997ac1315bdfb3eeac6cf89dd20f816c9c02baebccd066"
+checksum = "154b0902402807a043579102f949e6dd6f3a09d2d5049929fd710fc3192bf109"
 dependencies = [
  "anyhow",
  "bincode",
@@ -1903,9 +1903,9 @@ dependencies = [
 
 [[package]]
 name = "deno_ops"
-version = "0.182.0"
+version = "0.183.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "623fee81066617b7a706923bc6364cd4181d35e6438e69d30dc8dd9ec94936f7"
+checksum = "9114f9eb6419839f1ab9668f91c463238945bb974e1998629a703f72b4608daf"
 dependencies = [
  "proc-macro-rules",
  "proc-macro2",
@@ -6310,9 +6310,9 @@ dependencies = [
 
 [[package]]
 name = "serde_v8"
-version = "0.215.0"
+version = "0.216.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41001c84d438ec3ad2d86413993cd72cb00b4d47aad010fc562bfdbb9aeff71d"
+checksum = "1733b8192f123beedd2fc7998efeaf2a0b8bfa35c01537f50b690e786db8024c"
 dependencies = [
  "num-bigint",
  "serde",
@@ -7945,9 +7945,9 @@ dependencies = [
 
 [[package]]
 name = "v8"
-version = "0.104.0"
+version = "0.105.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "834593934c4b3693706bcbd24d4e2accf02a318a62efd2a4e5e33b5452074882"
+checksum = "692624c4fd58ff50aa6d690c159df18e7881c13970005b9b2bff77dc425fd370"
 dependencies = [
  "bindgen",
  "bitflags 2.5.0",

filename: Cargo.toml
patch: @@ -45,7 +45,7 @@ repository = "https://github.com/denoland/deno"
 
 [workspace.dependencies]
 deno_ast = { version = "=0.41.2", features = ["transpiling"] }
-deno_core = { version = "0.306.0" }
+deno_core = { version = "0.307.0" }
 
 deno_bench_util = { version = "0.160.0", path = "./bench_util" }
 deno_lockfile = "=0.23.0"

filename: tests/testdata/run/heapstats.js.out
patch: @@ -1,2 +1,2 @@
-Allocated: 4MB
-Freed: -4MB
+Allocated: 8MB
+Freed: -8MB
Repository: ggml-org/llama.cpp
Pull request: fix: check model pointer validity before use

If llama_model_load_from_file fails to load the model, the model pointer will be null. You must check for a null pointer before accessing the model pointer.

Changed files:
filename: examples/simple/simple.cpp
patch: @@ -84,13 +84,13 @@ int main(int argc, char ** argv) {
     model_params.n_gpu_layers = ngl;
 
     llama_model * model = llama_model_load_from_file(model_path.c_str(), model_params);
-    const llama_vocab * vocab = llama_model_get_vocab(model);
 
     if (model == NULL) {
         fprintf(stderr , "%s: error: unable to load model\n" , __func__);
         return 1;
     }
 
+    const llama_vocab * vocab = llama_model_get_vocab(model);
     // tokenize the prompt
 
     // find the number of tokens in the prompt